Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal/catch_polyfills.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2023-11-18 16:17:49 +0100
committerMartin Hořeňovský2023-12-10 18:44:06 +0100
commitbfd9f0f5a67c0127b25ac82eb828f6ab71aaae1e (patch)
treea0efb539745f0ca7186bacc24da48bea66669411 /src/catch2/internal/catch_polyfills.cpp
parent9a1e73568c86644bda84d2d8c719955a050bb3e3 (diff)
downloadcatch3-bfd9f0f5a67c0127b25ac82eb828f6ab71aaae1e.tar.gz
Move nextafter polyfill to polyfills.hpp
Diffstat (limited to 'src/catch2/internal/catch_polyfills.cpp')
-rw-r--r--src/catch2/internal/catch_polyfills.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/catch2/internal/catch_polyfills.cpp b/src/catch2/internal/catch_polyfills.cpp
index 96efad5d..776c2243 100644
--- a/src/catch2/internal/catch_polyfills.cpp
+++ b/src/catch2/internal/catch_polyfills.cpp
@@ -31,4 +31,12 @@ namespace Catch {
}
#endif
+#if !defined( CATCH_CONFIG_GLOBAL_NEXTAFTER )
+ float nextafter( float x, float y ) { return std::nextafter( x, y ); }
+ double nextafter( double x, double y ) { return std::nextafter( x, y ); }
+#else
+ float nextafter( float x, float y ) { return ::nextafterf( x, y ); }
+ double nextafter( double x, double y ) { return ::nextafter( x, y ); }
+#endif
+
} // end namespace Catch