| Home | Libraries | People | FAQ | More

#### associated_allocator< reference_wrapper< T >, Allocator >::type

Forwards `type` to the associator specialisation for the unwrapped type `T`.

    typedef associated_allocator< T, Allocator >::type type;

###### Types

Name | Description
--- | ---
type | If T has a nested type allocator_type, T::allocator_type. Otherwise Allocator.

###### Member Functions

Name | Description
--- | ---
get [static] | If T has a nested type allocator_type, returns t.get_allocator(). Otherwise returns type(). — 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`.

- Provide a nested typedef `type` that identifies a type meeting the Allocator requirements.
- Provide a noexcept static member function named `get`, callable as `get(t)` and with return type `type` or a (possibly const) reference to `type`.
- Provide a noexcept static member function named `get`, callable as `get(t,a)` and with return type `type` or a (possibly const) reference to `type`.

###### See Also

Custom memory allocation

###### Requirements

Header: `boost/asio/associated_allocator.hpp`

Convenience header: `boost/asio.hpp`