diff --git a/recipes/boost/all/conandata.yml b/recipes/boost/all/conandata.yml index 375beadde1300..17c48d0d21287 100644 --- a/recipes/boost/all/conandata.yml +++ b/recipes/boost/all/conandata.yml @@ -115,6 +115,10 @@ patches: patch_description: "Fix MSVC /RTCc build runtime failures." patch_type: "official" patch_source: "https://www.boost.org/patches/1_80_0/0006-unordered-msvc-rtcc.patch" + - patch_file: "patches/boost_build-with-newer-clang.patch" + patch_description: "Fix MPL/Numeric compilation errors with newer Clang" + patch_type: "portability" + patch_source: "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a , https://github.com/boostorg/mpl/pull/77" "1.79.0": - patch_file: "patches/boost_locale_fail_on_missing_backend.patch" patch_description: "Fails the build when there is no iconv backend" @@ -139,6 +143,10 @@ patches: patch_description: "Fix access specifier preventing use of experimental iterators. Allow more granular control over enabled experimental features." patch_type: "portability" patch_source: "https://github.com/boostorg/geometry/discussions/1041" + - patch_file: "patches/boost_build-with-newer-clang.patch" + patch_description: "Fix MPL/Numeric compilation errors with newer Clang" + patch_type: "portability" + patch_source: "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a , https://github.com/boostorg/mpl/pull/77" "1.78.0": - patch_file: "patches/boost_locale_fail_on_missing_backend.patch" patch_description: "Fails the build when there is no iconv backend" @@ -159,3 +167,7 @@ patches: patch_description: "Don't skip install targets if there's no in ureqs" patch_type: "official" patch_source: "https://github.com/boostorg/build/pull/113" + - patch_file: "patches/boost_build-with-newer-clang.patch" + patch_description: "Fix MPL/Numeric compilation errors with newer Clang" + patch_type: "portability" + patch_source: "https://github.com/boostorg/numeric_conversion/commit/50a1eae942effb0a9b90724323ef8f2a67e7984a , https://github.com/boostorg/mpl/pull/77" diff --git a/recipes/boost/all/patches/boost_build-with-newer-clang.patch b/recipes/boost/all/patches/boost_build-with-newer-clang.patch new file mode 100644 index 0000000000000..585f877ae2552 --- /dev/null +++ b/recipes/boost/all/patches/boost_build-with-newer-clang.patch @@ -0,0 +1,89 @@ +diff --git a/boost/numeric/conversion/detail/int_float_mixture.hpp b/boost/numeric/conversion/detail/int_float_mixture.hpp +index 464e527..7690d07 100644 +--- a/boost/numeric/conversion/detail/int_float_mixture.hpp ++++ b/boost/numeric/conversion/detail/int_float_mixture.hpp +@@ -16,15 +16,15 @@ + #include "boost/numeric/conversion/int_float_mixture_enum.hpp" + #include "boost/numeric/conversion/detail/meta.hpp" + +-#include "boost/mpl/integral_c.hpp" ++#include "boost/type_traits/integral_constant.hpp" + + namespace boost { namespace numeric { namespace convdetail + { + // Integral Constants for 'IntFloatMixture' +- typedef mpl::integral_c int2int_c ; +- typedef mpl::integral_c int2float_c ; +- typedef mpl::integral_c float2int_c ; +- typedef mpl::integral_c float2float_c ; ++ typedef boost::integral_constant int2int_c ; ++ typedef boost::integral_constant int2float_c ; ++ typedef boost::integral_constant float2int_c ; ++ typedef boost::integral_constant float2float_c ; + + // Metafunction: + // +diff --git a/boost/numeric/conversion/detail/sign_mixture.hpp b/boost/numeric/conversion/detail/sign_mixture.hpp +index c7f9e42..fde1584 100644 +--- a/boost/numeric/conversion/detail/sign_mixture.hpp ++++ b/boost/numeric/conversion/detail/sign_mixture.hpp +@@ -16,15 +16,15 @@ + #include "boost/numeric/conversion/sign_mixture_enum.hpp" + #include "boost/numeric/conversion/detail/meta.hpp" + +-#include "boost/mpl/integral_c.hpp" ++#include "boost/type_traits/integral_constant.hpp" + + namespace boost { namespace numeric { namespace convdetail + { + // Integral Constants for 'SignMixture' +- typedef mpl::integral_c unsig2unsig_c ; +- typedef mpl::integral_c sig2sig_c ; +- typedef mpl::integral_c sig2unsig_c ; +- typedef mpl::integral_c unsig2sig_c ; ++ typedef boost::integral_constant unsig2unsig_c ; ++ typedef boost::integral_constant sig2sig_c ; ++ typedef boost::integral_constant sig2unsig_c ; ++ typedef boost::integral_constant unsig2sig_c ; + + // Metafunction: + // +diff --git a/boost/numeric/conversion/detail/udt_builtin_mixture.hpp b/boost/numeric/conversion/detail/udt_builtin_mixture.hpp +index 36dbc49..a39d29f 100644 +--- a/boost/numeric/conversion/detail/udt_builtin_mixture.hpp ++++ b/boost/numeric/conversion/detail/udt_builtin_mixture.hpp +@@ -15,15 +15,15 @@ + #include "boost/numeric/conversion/udt_builtin_mixture_enum.hpp" + #include "boost/numeric/conversion/detail/meta.hpp" + +-#include "boost/mpl/integral_c.hpp" ++#include "boost/type_traits/integral_constant.hpp" + + namespace boost { namespace numeric { namespace convdetail + { + // Integral Constants for 'UdtMixture' +- typedef mpl::integral_c builtin2builtin_c ; +- typedef mpl::integral_c builtin2udt_c ; +- typedef mpl::integral_c udt2builtin_c ; +- typedef mpl::integral_c udt2udt_c ; ++ typedef boost::integral_constant builtin2builtin_c ; ++ typedef boost::integral_constant builtin2udt_c ; ++ typedef boost::integral_constant udt2builtin_c ; ++ typedef boost::integral_constant udt2udt_c ; + + // Metafunction: + // +diff --git a/boost/mpl/aux_/integral_wrapper.hpp b/boost/mpl/aux_/integral_wrapper.hpp +index 8748fbb93..5f24b7949 100644 +--- a/boost/mpl/aux_/integral_wrapper.hpp ++++ b/boost/mpl/aux_/integral_wrapper.hpp +@@ -56,7 +56,8 @@ struct AUX_WRAPPER_NAME + // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), + // while some other don't like 'value + 1' (Borland), and some don't like + // either +-#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) ++#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) \ ++ || __cplusplus >= 201103L + private: + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1))); + BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)));