external/boost: Avoid some -Wdeprecated-variadic-comma-omission
...new with GCC 15 trunk -std=c++26 since <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=cc67d95dc100706ea665e8cce581d59466aba62e> "c++: Implement C++26 P3176R1 - The Oxford variadic comma", > In file included from workdir/UnpackedTarball/boost/boost/rational.hpp:82, > from source/external/boost/include/boost/rational.hpp:30, > from source/tools/source/generic/fract.cxx:32: > workdir/UnpackedTarball/boost/boost/integer/common_factor_rt.hpp:66:56: error: omission of ‘,’ before varargs ‘...’ is deprecated in C++26 [-Werror=deprecated-variadic-comma-omission] > 66 | inline constexpr void constexpr_swap(T&a, U& b...) BOOST_GCD_NOEXCEPT(T) > | ^~~ > | , and > In file included from workdir/UnpackedTarball/boost/boost/move/unique_ptr.hpp:24, > from workdir/UnpackedTarball/boost/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp:18, > from workdir/UnpackedTarball/boost/boost/spirit/home/classic/core/non_terminal/grammar.hpp:21, > from workdir/UnpackedTarball/boost/boost/spirit/home/classic/core.hpp:42, > from workdir/UnpackedTarball/boost/boost/spirit/home/classic.hpp:24, > from workdir/UnpackedTarball/boost/boost/spirit/include/classic.hpp:11, > from source/external/boost/include/boost/spirit/include/classic.hpp:30, > from sdext/source/pdfimport/pdfparse/pdfparse.cxx:23: > workdir/UnpackedTarball/boost/boost/move/detail/unique_ptr_meta_utils.hpp:500:39: error: omission of ‘,’ before varargs ‘...’ is deprecated in C++26 [-Werror=deprecated-variadic-comma-omission] > 500 | struct is_unary_function_impl<R (*)(T0...)> > | ^~~ > | , Change-Id: I56856e274a7c577c53d96343992bb79d4c3d602e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177730 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
This commit is contained in:
parent
6d96021511
commit
0b42fcdb37
3 changed files with 72 additions and 0 deletions
28
external/boost/0001-Add-a-comma-before-ellipsis-in-constexpr_swap.patch.2
vendored
Normal file
28
external/boost/0001-Add-a-comma-before-ellipsis-in-constexpr_swap.patch.2
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
From 2dfe66886d71b9a341433ea8b6ff225cc07da80b Mon Sep 17 00:00:00 2001
|
||||
From: Andrey Semashev <andrey.semashev@gmail.com>
|
||||
Date: Mon, 2 Dec 2024 19:22:20 +0300
|
||||
Subject: Add a comma before ellipsis in constexpr_swap.
|
||||
|
||||
gcc 15 complains that the comma is required before vararg ellipsis.
|
||||
|
||||
Fixes https://github.com/boostorg/integer/issues/35.
|
||||
---
|
||||
include/boost/integer/common_factor_rt.hpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/boost/integer/common_factor_rt.hpp b/include/boost/integer/common_factor_rt.hpp
|
||||
index d6765d4..817682f 100644
|
||||
--- a/include/boost/integer/common_factor_rt.hpp
|
||||
+++ b/include/boost/integer/common_factor_rt.hpp
|
||||
@@ -64,7 +64,7 @@ namespace boost {
|
||||
return a.swap(b);
|
||||
}
|
||||
template <class T, class U>
|
||||
- inline constexpr void constexpr_swap(T&a, U& b...) BOOST_GCD_NOEXCEPT(T)
|
||||
+ inline constexpr void constexpr_swap(T& a, U& b, ...) BOOST_GCD_NOEXCEPT(T)
|
||||
{
|
||||
T t(static_cast<T&&>(a));
|
||||
a = static_cast<T&&>(b);
|
||||
--
|
||||
2.47.1
|
||||
|
38
external/boost/0001-Avoid-Wdeprecated-variadic-comma-omission-with-GCC-1.patch.2
vendored
Normal file
38
external/boost/0001-Avoid-Wdeprecated-variadic-comma-omission-with-GCC-1.patch.2
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
From aa25af1928cc275537276c1a50e6ba49333a3aec Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
||||
Date: Mon, 2 Dec 2024 19:06:25 +0100
|
||||
Subject: Avoid -Wdeprecated-variadic-comma-omission with GCC 15 trunk
|
||||
-std=c++26
|
||||
|
||||
...since
|
||||
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=cc67d95dc100706ea665e8cce581d59466aba62e>
|
||||
"c++: Implement C++26 P3176R1 - The Oxford variadic comma"
|
||||
---
|
||||
include/boost/move/detail/unique_ptr_meta_utils.hpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/boost/move/detail/unique_ptr_meta_utils.hpp b/include/boost/move/detail/unique_ptr_meta_utils.hpp
|
||||
index 4c6aeb5..27154e0 100644
|
||||
--- a/include/boost/move/detail/unique_ptr_meta_utils.hpp
|
||||
+++ b/include/boost/move/detail/unique_ptr_meta_utils.hpp
|
||||
@@ -497,7 +497,7 @@ struct is_unary_function_impl<R (*)(T0)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0>
|
||||
-struct is_unary_function_impl<R (*)(T0...)>
|
||||
+struct is_unary_function_impl<R (*)(T0, ...)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#else // BOOST_MOVE_TT_TEST_MSC_FUNC_SIGS
|
||||
@@ -519,7 +519,7 @@ struct is_unary_function_impl<R (__cdecl*)(T0)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0>
|
||||
-struct is_unary_function_impl<R (__cdecl*)(T0...)>
|
||||
+struct is_unary_function_impl<R (__cdecl*)(T0, ...)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#endif
|
||||
--
|
||||
2.47.1
|
||||
|
6
external/boost/UnpackedTarball_boost.mk
vendored
6
external/boost/UnpackedTarball_boost.mk
vendored
|
@ -36,6 +36,12 @@ boost_patches += Wundef.patch.0
|
|||
|
||||
boost_patches += boost.spirit.noreturn.patch
|
||||
|
||||
boost_patches += 0001-Add-a-comma-before-ellipsis-in-constexpr_swap.patch.2
|
||||
|
||||
# Sent upstream as <https://github.com/boostorg/move/pull/58> "Avoid
|
||||
# -Wdeprecated-variadic-comma-omission with GCC 15 trunk -std=c++26":
|
||||
boost_patches += 0001-Avoid-Wdeprecated-variadic-comma-omission-with-GCC-1.patch.2
|
||||
|
||||
$(eval $(call gb_UnpackedTarball_UnpackedTarball,boost))
|
||||
|
||||
$(eval $(call gb_UnpackedTarball_set_tarball,boost,$(BOOST_TARBALL)))
|
||||
|
|
Loading…
Reference in a new issue