Traits type used to obtain the allocator associated with an object.
template< typename T, typename Allocator = std::allocator<void>> struct associated_allocator
Name |
Description |
---|---|
If T has a nested type allocator_type, T::allocator_type. Otherwise Allocator. |
Name |
Description |
---|---|
If T has a nested type allocator_type, returns t.get_allocator(). Otherwise returns a. |
A program may specialise this traits type if the T
template
parameter in the specialisation is a user-defined type. The template parameter
Allocator
shall be a type meeting the Allocator requirements.
Specialisations shall meet the following requirements, where t
is a const reference to an object of type T
, and a
is an object of type Allocator
.
type
that identifies a type meeting
the Allocator requirements.
get
, callable
as get(t)
and with return type type
.
get
, callable
as get(t,a)
and with return type type
.
Header: asio/associated_allocator.hpp
Convenience header: asio.hpp