Skip to content

Commit 0d941f0

Browse files
authored
Fix issue #1023 (#1024)
1 parent 74bb4bc commit 0d941f0

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

include/boost/math/concepts/real_concept.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@
4545
# include <cstdio>
4646
#endif
4747

48-
#if __has_include(<stdfloat>)
49-
# include <stdfloat>
48+
#if defined __has_include
49+
# if __cplusplus > 202002L || _MSVC_LANG > 202002L
50+
# if __has_include (<stdfloat>)
51+
# include <stdfloat>
52+
# endif
53+
# endif
5054
#endif
5155

5256
namespace boost{ namespace math{

include/boost/math/tools/config.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@
152152
// libstdc++3 only defines to/from_chars for std::float128_t when one of these defines are set
153153
// otherwise we're right out of luck...
154154
# if defined(_GLIBCXX_LDOUBLE_IS_IEEE_BINARY128) || defined(_GLIBCXX_HAVE_FLOAT128_MATH)
155-
# include <cstring> // std::strlen is used with from_chars
156-
# include <charconv>
157-
# include <stdfloat>
158-
# define BOOST_MATH_USE_CHARCONV_FOR_CONVERSION
159-
#endif
155+
# include <cstring> // std::strlen is used with from_chars
156+
# include <charconv>
157+
# include <stdfloat>
158+
# define BOOST_MATH_USE_CHARCONV_FOR_CONVERSION
159+
# endif
160160
# endif
161161
#endif
162162

include/boost/math/tools/promotion.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@
2727
#include <type_traits>
2828

2929
#if defined __has_include
30-
# if __has_include (<stdfloat>)
30+
# if __cplusplus > 202002L || _MSVC_LANG > 202002L
31+
# if __has_include (<stdfloat>)
3132
# include <stdfloat>
33+
# endif
3234
# endif
3335
#endif
3436

0 commit comments

Comments
 (0)