]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove DEAL_II_HAVE_ISFINITE. 4801/head
authorDavid Wells <wellsd2@rpi.edu>
Sat, 12 Aug 2017 23:23:50 +0000 (19:23 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Sat, 12 Aug 2017 23:23:50 +0000 (19:23 -0400)
This function is now part of the C++11 standard.

cmake/checks/check_01_cxx_features.cmake
include/deal.II/base/config.h.in
include/deal.II/base/numbers.h

index 877438eaf4cba1bafea5c7e95fe48a14995aa72b..8338513facd53e75d3e700791940b5e49b9f611e 100644 (file)
@@ -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 <cmath>
-  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:
index 9127408b7a2cfd9dd1db167c6cb14d7180759d9b..1450026e62a8dc1d8d708ee7da4be07f2f7bedb1 100644 (file)
  */
 
 #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@
index ded2ddbdeb987eff9cd62e6905a52ef253ce0952..572e85975c83612345049e6d6c2b40298150d79c 100644 (file)
@@ -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<double>::max())
-            &&
-            (x <= std::numeric_limits<double>::max()));
-#endif
+    return std::isfinite(x);
   }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.