Add use_future_::rebind() as replacement for operator[].

This commit is contained in:
Christopher Kohlhoff 2015-03-06 09:41:37 +11:00
parent 4599179812
commit 17efec1803

View File

@ -56,12 +56,21 @@ public:
{
}
/// 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