Fix Boost.Signals2 C++20 compatibility (#1834764)
This commit is contained in:
parent
7ef9cdfd23
commit
c61827c98a
2 changed files with 42 additions and 1 deletions
34
auto_buffer-C-20-compatibility.patch
Normal file
34
auto_buffer-C-20-compatibility.patch
Normal 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
|
||||
|
||||
|
|
@ -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: 16%{?dist}
|
||||
Release: 17%{?dist}
|
||||
License: Boost and MIT and Python
|
||||
|
||||
%global toplev_dirname %{real_name}_%{version_enc}
|
||||
|
|
@ -152,6 +152,9 @@ 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
|
||||
|
||||
|
|
@ -658,6 +661,7 @@ find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x
|
|||
%patch85 -p2
|
||||
%patch86 -p1
|
||||
%patch87 -p2
|
||||
%patch88 -p2
|
||||
|
||||
%build
|
||||
# Dump the versions being used into the build logs.
|
||||
|
|
@ -1277,6 +1281,9 @@ fi
|
|||
%{_mandir}/man1/bjam.1*
|
||||
|
||||
%changelog
|
||||
* Tue May 12 2020 Avi Kivity <avi@scylladb.com> - 1.69.0-17
|
||||
- Add patch for C++20 compatibility in Boost.Signals2 (#1834764)
|
||||
|
||||
* Mon May 11 2020 Jonathan Wakely <jwakely@redhat.com> - 1.69.0-16
|
||||
- Add patch for C++20 compatibility in Boost.Test (#1832639)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue