Clementine
Public Types | Static Public Member Functions | List of all members
asio::associated_allocator< T, Allocator > Struct Template Reference

Traits type used to obtain the allocator associated with an object. More...

#include <associated_allocator.hpp>

Public Types

typedef detail::associated_allocator_impl< T, Allocator >::type type
 If T has a nested type allocator_type, T::allocator_type. More...
 

Static Public Member Functions

static type get (const T &t, const Allocator &a=Allocator()) ASIO_NOEXCEPT
 If T has a nested type allocator_type, returns t.get_allocator(). More...
 

Detailed Description

template<typename T, typename Allocator = std::allocator<void>>
struct asio::associated_allocator< T, Allocator >

Traits type used to obtain the allocator associated with an object.

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.

Member Typedef Documentation

◆ type

template<typename T, typename Allocator = std::allocator<void>>
typedef detail::associated_allocator_impl<T, Allocator>::type asio::associated_allocator< T, Allocator >::type

If T has a nested type allocator_type, T::allocator_type.

Otherwise Allocator.

Member Function Documentation

◆ get()

template<typename T, typename Allocator = std::allocator<void>>
static type asio::associated_allocator< T, Allocator >::get ( const T &  t,
const Allocator &  a = Allocator() 
)
inlinestatic

If T has a nested type allocator_type, returns t.get_allocator().

Otherwise returns a.


The documentation for this struct was generated from the following file: