Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Avi Kivity
87594c3e0d Fix Boost.Signals2 C++20 compatibility (#1834764) 2020-05-12 13:57:21 +01:00
Jonathan Wakely
6a7b5bf1d5 Add patch for C++20 compatibility in Boost.Test (#1832639) 2020-05-11 13:30:21 +01:00
Jonathan Wakely
a8ec7f887b Patch Boost.Format for C++20 compatibility with GCC 10 (#1818723) 2020-03-30 17:12:07 +01:00
4 changed files with 134 additions and 1 deletions

View file

@ -0,0 +1,34 @@
From 675ea3ddf714e2594393ed935f64dce99721b7d7 Mon Sep 17 00:00:00 2001
From: Avi Kivity <avi@scylladb.com>
Date: Tue, 12 May 2020 14:29:56 +0300
Subject: [PATCH] auto_buffer: C++20 compatibility
C++20's std::allocator does not define the pointer member type,
use std::allocator_traits instead.
---
include/boost/signals2/detail/auto_buffer.hpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/boost/signals2/detail/auto_buffer.hpp b/include/boost/signals2/detail/auto_buffer.hpp
index 5ff8dd2..ed62152 100644
--- a/include/boost/signals2/detail/auto_buffer.hpp
+++ b/include/boost/signals2/detail/auto_buffer.hpp
@@ -140,11 +140,15 @@ namespace detail
typedef Allocator allocator_type;
typedef T value_type;
typedef typename Allocator::size_type size_type;
typedef typename Allocator::difference_type difference_type;
typedef T* pointer;
+#if __cplusplus <= 201703L
typedef typename Allocator::pointer allocator_pointer;
+#else
+ typedef typename std::allocator_traits<Allocator>::pointer allocator_pointer;
+#endif
typedef const T* const_pointer;
typedef T& reference;
typedef const T& const_reference;
typedef pointer iterator;
typedef const_pointer const_iterator;
--
2.26.2

View file

@ -0,0 +1,28 @@
--- boost_1_69_0/boost/format/alt_sstream_impl.hpp~ 2020-03-30 15:20:18.565658757 +0100
+++ boost_1_69_0/boost/format/alt_sstream_impl.hpp 2020-03-30 15:20:33.768636162 +0100
@@ -40,8 +40,11 @@
#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
void *vd_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0);
Ch *new_ptr = static_cast<Ch *>(vd_ptr);
-#else
+#elif defined BOOST_NO_CXX11_ALLOCATOR
Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0);
+#else
+ Ch *new_ptr = std::allocator_traits<compat_allocator_type>::allocate(alloc_,
+ sz, is_allocated_? eback() : 0);
#endif
// if this didnt throw, we're safe, update the buffer
dealloc();
@@ -257,8 +260,11 @@
#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
void *vdptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
newptr = static_cast<Ch *>(vdptr);
-#else
+#elif defined BOOST_NO_CXX11_ALLOCATOR
newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
+#else
+ newptr = std::allocator_traits<compat_allocator_type>::allocate(alloc_,
+ new_size, is_allocated_? oldptr : 0);
#endif
}

View file

@ -0,0 +1,50 @@
From 8ac88c62dcc809d42daf8b6bef10f7adecc46dd1 Mon Sep 17 00:00:00 2001
From: Laurent Stacul <laurent.stacul@amadeus.com>
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<char const*>::operator()( std::ostream& ostr, char const* t )
void
print_log_value<wchar_t const*>::operator()( std::ostream& ostr, wchar_t const* t )
{
- ostr << ( t ? t : L"null string" );
+ ostr << ( t ? reinterpret_cast<const void*>(t) : "null string" );
}
//____________________________________________________________________________//
From db6b98c72783351e0acd3c558691323a7a103ba9 Mon Sep 17 00:00:00 2001
From: Raffi Enficiaud <raffi.enficiaud@mines-paris.org>
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<char const*>::operator()( std::ostream& ostr, char const* t )
void
print_log_value<wchar_t const*>::operator()( std::ostream& ostr, wchar_t const* t )
{
- ostr << ( t ? reinterpret_cast<const void*>(t) : "null string" );
+ if(t) {
+ ostr << static_cast<const void*>(t);
+ }
+ else {
+ ostr << "null w-string";
+ }
}
//____________________________________________________________________________//

View file

@ -45,7 +45,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: 9%{?dist}
Release: 12%{?dist}
License: Boost and MIT and Python
%global toplev_dirname %{real_name}_%{version_enc}
@ -152,6 +152,15 @@ Patch84: boost-1.69-random.patch
# https://github.com/boostorg/mpi/pull/81
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
# https://bugzilla.redhat.com/show_bug.cgi?id=1834764
Patch88: auto_buffer-C-20-compatibility.patch
%bcond_with tests
%bcond_with docs_generated
@ -761,6 +770,9 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x
%patch83 -p1
%patch84 -p2
%patch85 -p2
%patch86 -p1
%patch87 -p2
%patch88 -p2
%build
# Dump the versions being used into the build logs.
@ -1483,6 +1495,15 @@ fi
%{_mandir}/man1/bjam.1*
%changelog
* Tue May 12 2020 Avi Kivity <avi@scylladb.com> - 1.69.0-12
- Add patch for C++20 compatibility in Boost.Signals2 (#1834764)
* Mon May 11 2020 Jonathan Wakely <jwakely@redhat.com> - 1.69.0-11
- Add patch for C++20 compatibility in Boost.Test (#1832639)
* Mon Mar 30 2020 Jonathan Wakely <jwakely@redhat.com> - 1.69.0-10
- Patch Boost.Format for C++20 compatibility with GCC 10 (#1818723)
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.69.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild