Move nextafter polyfill to polyfills.hpp

This commit is contained in:
Martin Hořeňovský committed 2023-12-10 18:44:06 +01:00
1 parent 9a1e73568c
commit bfd9f0f5a6
3 files changed
+13 -15

No files matched your search

+8
View File
@@ -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