check C++ standard version before including <stdfloat>

fixes #238
This commit is contained in:
Marcin Wojdyr 2024-02-03 15:05:30 +01:00
parent 8378916ed8
commit 55a5b3c8e1

View File

@ -8,7 +8,7 @@
#include <type_traits> #include <type_traits>
#include <system_error> #include <system_error>
#ifdef __has_include #ifdef __has_include
#if __has_include(<stdfloat>) #if __has_include(<stdfloat>) && (__cplusplus > 202002L || _MSVC_LANG > 202002L)
#include <stdfloat> #include <stdfloat>
#endif #endif
#endif #endif