diff options
Diffstat (limited to 'boost/asio/impl/use_future.hpp')
-rw-r--r-- | boost/asio/impl/use_future.hpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/boost/asio/impl/use_future.hpp b/boost/asio/impl/use_future.hpp index 5acc127bfa..92106f4704 100644 --- a/boost/asio/impl/use_future.hpp +++ b/boost/asio/impl/use_future.hpp @@ -2,7 +2,7 @@ // impl/use_future.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -34,10 +34,12 @@ namespace detail { { public: // Construct from use_future special value. - template <typename Allocator> - promise_handler(use_future_t<Allocator> uf) + template <typename Alloc> + promise_handler(use_future_t<Alloc> uf) : promise_(std::allocate_shared<std::promise<T> >( - uf.get_allocator(), std::allocator_arg, uf.get_allocator())) + typename Alloc::template rebind<char>::other(uf.get_allocator()), + std::allocator_arg, + typename Alloc::template rebind<char>::other(uf.get_allocator()))) { } @@ -66,10 +68,12 @@ namespace detail { { public: // Construct from use_future special value. Used during rebinding. - template <typename Allocator> - promise_handler(use_future_t<Allocator> uf) + template <typename Alloc> + promise_handler(use_future_t<Alloc> uf) : promise_(std::allocate_shared<std::promise<void> >( - uf.get_allocator(), std::allocator_arg, uf.get_allocator())) + typename Alloc::template rebind<char>::other(uf.get_allocator()), + std::allocator_arg, + typename Alloc::template rebind<char>::other(uf.get_allocator()))) { } |