From 9267c0ae492361aa04f50899ab9787bbc95eff24 Mon Sep 17 00:00:00 2001 From: Moritz Baumann Date: Tue, 9 Dec 2025 11:26:41 +0100 Subject: [PATCH 1/2] Improve check for incomplete header All versions of libc++ currently include a useless header by default, not just the version shipped with Apple Clang. For example, IBM Open XL C/C++ 17.1.3 on AIX is affected as well. --- include/boost/math/tools/config.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index df0059873d..b9c2611dcb 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -84,6 +84,8 @@ #else // Things from boost/config that are required, and easy to replicate +#include + #define BOOST_MATH_PREVENT_MACRO_SUBSTITUTION #define BOOST_MATH_NO_REAL_CONCEPT_TESTS #define BOOST_MATH_NO_DISTRIBUTION_CONCEPT_TESTS @@ -102,9 +104,9 @@ #if ((__cplusplus > 201700L) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700L))) #define BOOST_MATH_IF_CONSTEXPR if constexpr -// Clang on mac provides the execution header with none of the functionality. TODO: Check back on this +// libc++ currently provides the execution header with none of the functionality. // https://en.cppreference.com/w/cpp/compiler_support "Standardization of Parallelism TS" -# if !__has_include() || (defined(__APPLE__) && defined(__clang__)) +# if !__has_include() || !defined(__cpp_lib_execution) || (__cpp_lib_execution < 201603L) # define BOOST_MATH_NO_CXX17_HDR_EXECUTION # endif #else From f31a06e5de808650af1d943596a341d840fb7fc7 Mon Sep 17 00:00:00 2001 From: Moritz Baumann Date: Thu, 18 Dec 2025 15:28:25 +0100 Subject: [PATCH 2/2] Only include if it exists Co-authored-by: Matt Borland --- include/boost/math/tools/config.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index b9c2611dcb..4829ebe36e 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -84,7 +84,9 @@ #else // Things from boost/config that are required, and easy to replicate +#if __has_include() #include +#endif #define BOOST_MATH_PREVENT_MACRO_SUBSTITUTION #define BOOST_MATH_NO_REAL_CONCEPT_TESTS