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