From: David Wells Date: Sat, 12 Aug 2017 23:23:50 +0000 (-0400) Subject: Remove DEAL_II_HAVE_ISFINITE. X-Git-Tag: v9.0.0-rc1~1281^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df68710ef257329aabd0c7eab57120a790a1384e;p=dealii.git Remove DEAL_II_HAVE_ISFINITE. This function is now part of the C++11 standard. --- diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index 877438eaf4..8338513fac 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -22,7 +22,6 @@ # DEAL_II_WITH_CXX17 # # DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE -# DEAL_II_HAVE_ISFINITE # DEAL_II_HAVE_FP_EXCEPTIONS # DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS # @@ -513,13 +512,6 @@ CHECK_CXX_SOURCE_COMPILES( " DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE) -CHECK_CXX_SOURCE_COMPILES( - " - #include - int main(){ double d=0; std::isfinite (d); return 0; } - " - DEAL_II_HAVE_ISFINITE) - # # Check that we can use feenableexcept through the C++11 header file cfenv: diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 9127408b7a..1450026e62 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -108,7 +108,6 @@ */ #cmakedefine DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE -#cmakedefine DEAL_II_HAVE_ISFINITE #cmakedefine DEAL_II_HAVE_FP_EXCEPTIONS #cmakedefine DEAL_II_HAVE_COMPLEX_OPERATOR_OVERLOADS #cmakedefine DEAL_II_FALLTHROUGH @DEAL_II_FALLTHROUGH@ diff --git a/include/deal.II/base/numbers.h b/include/deal.II/base/numbers.h index ded2ddbdeb..572e85975c 100644 --- a/include/deal.II/base/numbers.h +++ b/include/deal.II/base/numbers.h @@ -291,16 +291,7 @@ namespace numbers inline bool is_finite (const double x) { -#ifdef DEAL_II_HAVE_ISFINITE - return !std::isnan(x) && std::isfinite (x); -#else - // Check against infinities. Note - // that if x is a NaN, then both - // comparisons will be false - return ((x >= -std::numeric_limits::max()) - && - (x <= std::numeric_limits::max())); -#endif + return std::isfinite(x); }