35 lines
1.6 KiB
Diff
35 lines
1.6 KiB
Diff
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
|
|
|