From 7ef9cdfd23a41ed6025fd365c3afd61d70a88538 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 11 May 2020 13:03:48 +0100 Subject: [PATCH] Add patch for C++20 compatibility in Boost.Test (#1832639) --- boost-1.69.0-test-cxx20.patch | 50 +++++++++++++++++++++++++++++++++++ boost.spec | 9 ++++++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 boost-1.69.0-test-cxx20.patch diff --git a/boost-1.69.0-test-cxx20.patch b/boost-1.69.0-test-cxx20.patch new file mode 100644 index 0000000..c9b0e67 --- /dev/null +++ b/boost-1.69.0-test-cxx20.patch @@ -0,0 +1,50 @@ +From 8ac88c62dcc809d42daf8b6bef10f7adecc46dd1 Mon Sep 17 00:00:00 2001 +From: Laurent Stacul +Date: Mon, 17 Feb 2020 08:57:49 +0000 +Subject: [PATCH] Fix compilation issue due to deleted + std::basic_ostream::operator<< overload + +--- + include/boost/test/impl/test_tools.ipp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/boost/test/impl/test_tools.ipp b/include/boost/test/impl/test_tools.ipp +index 40f24e6399..e4d61660b8 100644 +--- a/include/boost/test/impl/test_tools.ipp ++++ b/include/boost/test/impl/test_tools.ipp +@@ -124,7 +124,7 @@ print_log_value::operator()( std::ostream& ostr, char const* t ) + void + print_log_value::operator()( std::ostream& ostr, wchar_t const* t ) + { +- ostr << ( t ? t : L"null string" ); ++ ostr << ( t ? reinterpret_cast(t) : "null string" ); + } + + //____________________________________________________________________________// +From db6b98c72783351e0acd3c558691323a7a103ba9 Mon Sep 17 00:00:00 2001 +From: Raffi Enficiaud +Date: Sat, 9 May 2020 10:42:38 +0200 +Subject: [PATCH] Fixing cast issue when logging wchar_t + +--- + include/boost/test/impl/test_tools.ipp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/include/boost/test/impl/test_tools.ipp b/include/boost/test/impl/test_tools.ipp +index 025cd1a92a..bbee21fbbc 100644 +--- a/include/boost/test/impl/test_tools.ipp ++++ b/include/boost/test/impl/test_tools.ipp +@@ -124,7 +124,12 @@ print_log_value::operator()( std::ostream& ostr, char const* t ) + void + print_log_value::operator()( std::ostream& ostr, wchar_t const* t ) + { +- ostr << ( t ? reinterpret_cast(t) : "null string" ); ++ if(t) { ++ ostr << static_cast(t); ++ } ++ else { ++ ostr << "null w-string"; ++ } + } + + //____________________________________________________________________________// diff --git a/boost.spec b/boost.spec index 6f9f3d9..4b23dfb 100644 --- a/boost.spec +++ b/boost.spec @@ -44,7 +44,7 @@ Summary: The free peer-reviewed portable C++ source libraries Version: 1.69.0 %global version_enc 1_69_0 %global version_suffix 169 -Release: 15%{?dist} +Release: 16%{?dist} License: Boost and MIT and Python %global toplev_dirname %{real_name}_%{version_enc} @@ -149,6 +149,9 @@ Patch85: boost-1.69-mpi-c_data.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1818723 Patch86: boost-1.69-format-allocator.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1832639 +Patch87: boost-1.69.0-test-cxx20.patch + %bcond_with tests %bcond_with docs_generated @@ -654,6 +657,7 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x %patch84 -p2 %patch85 -p2 %patch86 -p1 +%patch87 -p2 %build # Dump the versions being used into the build logs. @@ -1273,6 +1277,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Mon May 11 2020 Jonathan Wakely - 1.69.0-16 +- Add patch for C++20 compatibility in Boost.Test (#1832639) + * Mon Mar 30 2020 Jonathan Wakely - 1.69.0-15 - Patch Boost.Format for C++20 compatibility with GCC 10 (#1818723)