From 07b78fd58464c1cef9a86b2502ee2c44f3a59171 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 28 Aug 2023 11:01:20 -0400 Subject: [PATCH] Fix issue #1023 --- include/boost/math/concepts/real_concept.hpp | 8 ++++++-- include/boost/math/tools/config.hpp | 10 +++++----- include/boost/math/tools/promotion.hpp | 4 +++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/include/boost/math/concepts/real_concept.hpp b/include/boost/math/concepts/real_concept.hpp index 56e4342e6b..565d58e421 100644 --- a/include/boost/math/concepts/real_concept.hpp +++ b/include/boost/math/concepts/real_concept.hpp @@ -45,8 +45,12 @@ # include #endif -#if __has_include() -# include +#if defined __has_include +# if __cplusplus > 202002L || _MSVC_LANG > 202002L +# if __has_include () +# include +# endif +# endif #endif namespace boost{ namespace math{ diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index 8316c0bc78..b1d93bc3d2 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -152,11 +152,11 @@ // libstdc++3 only defines to/from_chars for std::float128_t when one of these defines are set // otherwise we're right out of luck... # if defined(_GLIBCXX_LDOUBLE_IS_IEEE_BINARY128) || defined(_GLIBCXX_HAVE_FLOAT128_MATH) -# include // std::strlen is used with from_chars -# include -# include -# define BOOST_MATH_USE_CHARCONV_FOR_CONVERSION -#endif +# include // std::strlen is used with from_chars +# include +# include +# define BOOST_MATH_USE_CHARCONV_FOR_CONVERSION +# endif # endif #endif diff --git a/include/boost/math/tools/promotion.hpp b/include/boost/math/tools/promotion.hpp index 7b7789d037..842022694e 100644 --- a/include/boost/math/tools/promotion.hpp +++ b/include/boost/math/tools/promotion.hpp @@ -27,8 +27,10 @@ #include #if defined __has_include -# if __has_include () +# if __cplusplus > 202002L || _MSVC_LANG > 202002L +# if __has_include () # include +# endif # endif #endif