kkeithle / rpms / boost

Forked from rpms/boost 4 years ago
Clone
b4161c0
From 42e7869f411a75512fb6994c634eb086fb9eb5cc Mon Sep 17 00:00:00 2001
b4161c0
From: Christopher Kohlhoff <chris@kohlhoff.com>
b4161c0
Date: Sun, 11 Sep 2016 12:04:18 +1000
b4161c0
Subject: [PATCH] Fix allocator usage to compile with g++ 6.
b4161c0
b4161c0
---
b4161c0
 include/boost/asio/impl/use_future.hpp | 16 ++++++++++------
b4161c0
 1 file changed, 10 insertions(+), 6 deletions(-)
b4161c0
b4161c0
diff --git a/include/boost/asio/impl/use_future.hpp b/include/boost/asio/impl/use_future.hpp
b4161c0
index b954e14..92106f4 100644
b4161c0
--- a/include/boost/asio/impl/use_future.hpp
b4161c0
+++ b/include/boost/asio/impl/use_future.hpp
b4161c0
@@ -34,10 +34,12 @@ namespace detail {
b4161c0
   {
b4161c0
   public:
b4161c0
     // Construct from use_future special value.
b4161c0
-    template <typename Allocator>
b4161c0
-    promise_handler(use_future_t<Allocator> uf)
b4161c0
+    template <typename Alloc>
b4161c0
+    promise_handler(use_future_t<Alloc> uf)
b4161c0
       : promise_(std::allocate_shared<std::promise<T> >(
b4161c0
-            uf.get_allocator(), std::allocator_arg, uf.get_allocator()))
b4161c0
+            typename Alloc::template rebind<char>::other(uf.get_allocator()),
b4161c0
+            std::allocator_arg,
b4161c0
+            typename Alloc::template rebind<char>::other(uf.get_allocator())))
b4161c0
     {
b4161c0
     }
b4161c0
 
b4161c0
@@ -66,10 +68,12 @@ namespace detail {
b4161c0
   {
b4161c0
   public:
b4161c0
     // Construct from use_future special value. Used during rebinding.
b4161c0
-    template <typename Allocator>
b4161c0
-    promise_handler(use_future_t<Allocator> uf)
b4161c0
+    template <typename Alloc>
b4161c0
+    promise_handler(use_future_t<Alloc> uf)
b4161c0
       : promise_(std::allocate_shared<std::promise<void> >(
b4161c0
-            uf.get_allocator(), std::allocator_arg, uf.get_allocator()))
b4161c0
+            typename Alloc::template rebind<char>::other(uf.get_allocator()),
b4161c0
+            std::allocator_arg,
b4161c0
+            typename Alloc::template rebind<char>::other(uf.get_allocator())))
b4161c0
     {
b4161c0
     }
b4161c0