# DEAL_II_HAVE_ATTRIBUTE_FALLTHROUGH
# DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE
# DEAL_II_HAVE_CXX14_CONSTEXPR_CAN_CALL_NONCONSTEXPR
-# DEAL_II_HAVE_CXX17_SPECIAL_MATH_FUNCTIONS
# DEAL_II_HAVE_FP_EXCEPTIONS
# DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS
#
DEAL_II_HAVE_ATTRIBUTE_FALLTHROUGH
DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE
DEAL_II_HAVE_CXX14_CONSTEXPR_CAN_CALL_NONCONSTEXPR
- DEAL_II_HAVE_CXX17_SPECIAL_MATH_FUNCTIONS
DEAL_II_HAVE_FP_EXCEPTIONS
DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS
)
SET(DEAL_II_CONSTEXPR " ")
ENDIF()
-#
-# Not all compilers with C++17 support include the new special math
-# functions. Check this separately so that we can use C++17 compilers that don't
-# support it.
-#
-CHECK_CXX_SOURCE_COMPILES(
- "
- #include <cmath>
-
- int main()
- {
- std::cyl_bessel_j(1.0, 1.0);
- std::cyl_bessel_jf(1.0f, 1.0f);
- std::cyl_bessel_jl(1.0, 1.0);
- }
- "
- DEAL_II_HAVE_CXX17_SPECIAL_MATH_FUNCTIONS)
-
RESET_CMAKE_REQUIRED()
#cmakedefine DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE
#cmakedefine DEAL_II_HAVE_CXX14_CONSTEXPR_CAN_CALL_NONCONSTEXPR
-#cmakedefine DEAL_II_HAVE_CXX17_SPECIAL_MATH_FUNCTIONS
#cmakedefine DEAL_II_HAVE_FP_EXCEPTIONS
#cmakedefine DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS
#cmakedefine DEAL_II_FALLTHROUGH @DEAL_II_FALLTHROUGH@
#include <deal.II/base/config.h>
-#ifndef DEAL_II_HAVE_CXX17_SPECIAL_MATH_FUNCTIONS
+#ifndef __cpp_lib_math_special_functions
# include <boost/math/special_functions/bessel.hpp>
-#endif // DEAL_II_HAVE_CXX17_SPECIAL_MATH_FUNCTIONS
+#endif // __cpp_lib_math_special_functions
#include <cmath>
DEAL_II_NAMESPACE_OPEN
namespace std_cxx17
{
-#ifndef DEAL_II_HAVE_CXX17_SPECIAL_MATH_FUNCTIONS
+#ifndef __cpp_lib_math_special_functions
double (&cyl_bessel_j)(double,
double) = boost::math::cyl_bessel_j<double, double>;
float (&cyl_bessel_jf)(float,
using std::cyl_bessel_j;
using std::cyl_bessel_jf;
using std::cyl_bessel_jl;
-#endif // DEAL_II_HAVE_CXX17_SPECIAL_MATH_FUNCTIONS
+#endif // __cpp_lib_math_special_functions
} // namespace std_cxx17
DEAL_II_NAMESPACE_CLOSE
#include <deal.II/base/config.h>
-#ifndef DEAL_II_WITH_CXX17
-# include <deal.II/base/std_cxx14/utility.h>
-#else
-# include <tuple>
-#endif
+#include <tuple>
-#include <cmath>
+#ifndef __cpp_lib_apply
+# include <deal.II/base/std_cxx14/utility.h>
+#endif // __cpp_lib_apply
DEAL_II_NAMESPACE_OPEN
namespace std_cxx17
{
-#ifndef DEAL_II_WITH_CXX17
+#ifndef __cpp_lib_apply
template <typename F, typename Tuple, size_t... S>
auto
apply_impl(F &&fn, Tuple &&t, std_cxx14::index_sequence<S...>)
}
#else
using std::apply;
-#endif // DEAL_II_WITH_CXX17
+#endif // __cpp_lib_apply
} // namespace std_cxx17
DEAL_II_NAMESPACE_CLOSE