Add use_future_::rebind() as replacement for operator[].
diff --git a/asio/include/asio/use_future.hpp b/asio/include/asio/use_future.hpp index 1428bcc..15136a8 100644 --- a/asio/include/asio/use_future.hpp +++ b/asio/include/asio/use_future.hpp
@@ -56,12 +56,21 @@ { } - /// Specify an alternate allocator. +#if !defined(ASIO_NO_DEPRECATED) + /// (Deprecated: Use rebind().) Specify an alternate allocator. template <typename OtherAllocator> use_future_t<OtherAllocator> operator[](const OtherAllocator& allocator) const { return use_future_t<OtherAllocator>(allocator); } +#endif // !defined(ASIO_NO_DEPRECATED) + + /// Specify an alternate allocator. + template <typename OtherAllocator> + use_future_t<OtherAllocator> rebind(const OtherAllocator& allocator) const + { + return use_future_t<OtherAllocator>(allocator); + } /// Obtain allocator. allocator_type get_allocator() const