Compiling code with clang-cl from LLVM20. Code has cmake build system, compiled with C++17 standard.
Tons of errors like
D:\winsame\cary\dev1\contrib-llvm20_vs2022\boost-1_90.0-ser\include\boost/math/tools/numeric_limits.hpp(91): error: "constexpr" is not valid here
constexpr bool is_signed = std::numeric_limits::is_signed;
D:\winsame\cary\dev1\contrib-llvm20_vs2022\boost-1_90.0-ser\include\boost/math/tools/numeric_limits.hpp(92): error: "constexpr" is not valid here
constexpr bool is_integer = std::numeric_limits::is_integer;
A typical offending line:
BOOST_MATH_STATIC bool is_signed = std::numeric_limits<double>::is_signed;
It looks like this is coming from config.hpp:
# ifndef BOOST_MATH_HAS_GPU_SUPPORT
# define BOOST_MATH_INLINE_CONSTEXPR static constexpr
# define BOOST_MATH_STATIC static
# define BOOST_MATH_STATIC_LOCAL_VARIABLE
# else
# define BOOST_MATH_INLINE_CONSTEXPR constexpr.
# define BOOST_MATH_STATIC constexpr <-------
I tried changing constexpr to static, but the code still fails to compile.
Is there a better way to deal with this?
Disable GPU in Boost?