From 0e4c7a8061a4a35d09a1d64e136a0203f12da1a2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 17 Nov 2022 11:23:01 +0100 Subject: [PATCH] external/boost: Replace constexpr.patch.0 with alternative upstream fix Change-Id: I168c3bfbf5a194f7f5565ba2dc6086f3b4053d12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142828 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- ...l_c-to-boost-integral_constant-to-.patch.2 | 91 +++++++++++++++++++ external/boost/UnpackedTarball_boost.mk | 2 +- external/boost/constexpr.patch.0 | 33 ------- 3 files changed, 92 insertions(+), 34 deletions(-) create mode 100644 external/boost/0001-Change-mpl-integral_c-to-boost-integral_constant-to-.patch.2 delete mode 100644 external/boost/constexpr.patch.0 diff --git a/external/boost/0001-Change-mpl-integral_c-to-boost-integral_constant-to-.patch.2 b/external/boost/0001-Change-mpl-integral_c-to-boost-integral_constant-to-.patch.2 new file mode 100644 index 000000000000..643ec0fd0fb7 --- /dev/null +++ b/external/boost/0001-Change-mpl-integral_c-to-boost-integral_constant-to-.patch.2 @@ -0,0 +1,91 @@ +From 50a1eae942effb0a9b90724323ef8f2a67e7984a Mon Sep 17 00:00:00 2001 +From: Peter Dimov +Date: Wed, 16 Nov 2022 10:43:31 +0200 +Subject: [PATCH] Change mpl::integral_c to boost::integral_constant to avoid + Clang 16 errors when constructing out of range enums (refs #24, + https://github.com/boostorg/mpl/issues/69) + +--- + .../numeric/conversion/detail/int_float_mixture.hpp | 10 +++++----- + .../boost/numeric/conversion/detail/sign_mixture.hpp | 10 +++++----- + .../numeric/conversion/detail/udt_builtin_mixture.hpp | 10 +++++----- + 3 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/include/boost/numeric/conversion/detail/int_float_mixture.hpp b/include/boost/numeric/conversion/detail/int_float_mixture.hpp +index 464e527..7690d07 100644 +--- a/include/boost/numeric/conversion/detail/int_float_mixture.hpp ++++ b/include/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/include/boost/numeric/conversion/detail/sign_mixture.hpp b/include/boost/numeric/conversion/detail/sign_mixture.hpp +index c7f9e42..fde1584 100644 +--- a/include/boost/numeric/conversion/detail/sign_mixture.hpp ++++ b/include/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/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp b/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp +index 36dbc49..a39d29f 100644 +--- a/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp ++++ b/include/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: + // +-- +2.37.1 (Apple Git-137.1) + diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk index 9e5e277b0a2a..d3c945282b0d 100644 --- a/external/boost/UnpackedTarball_boost.mk +++ b/external/boost/UnpackedTarball_boost.mk @@ -37,7 +37,7 @@ boost_patches += boost-ios.patch.0 # "Fix ill-formed constant expression # errors": -boost_patches += constexpr.patch.0 +boost_patches += 0001-Change-mpl-integral_c-to-boost-integral_constant-to-.patch.2 $(eval $(call gb_UnpackedTarball_UnpackedTarball,boost)) diff --git a/external/boost/constexpr.patch.0 b/external/boost/constexpr.patch.0 deleted file mode 100644 index f641e6e1dcc1..000000000000 --- a/external/boost/constexpr.patch.0 +++ /dev/null @@ -1,33 +0,0 @@ ---- boost/numeric/conversion/int_float_mixture_enum.hpp -+++ boost/numeric/conversion/int_float_mixture_enum.hpp -@@ -12,7 +12,7 @@ - - namespace boost { namespace numeric - { -- enum int_float_mixture_enum -+ enum int_float_mixture_enum: int - { - integral_to_integral - ,integral_to_float ---- boost/numeric/conversion/sign_mixture_enum.hpp -+++ boost/numeric/conversion/sign_mixture_enum.hpp -@@ -12,7 +12,7 @@ - - namespace boost { namespace numeric - { -- enum sign_mixture_enum -+ enum sign_mixture_enum: int - { - unsigned_to_unsigned - ,signed_to_signed ---- boost/numeric/conversion/udt_builtin_mixture_enum.hpp -+++ boost/numeric/conversion/udt_builtin_mixture_enum.hpp -@@ -12,7 +12,7 @@ - - namespace boost { namespace numeric - { -- enum udt_builtin_mixture_enum -+ enum udt_builtin_mixture_enum: int - { - builtin_to_builtin - ,builtin_to_udt