Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

associated_allocator

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

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

Name

Description

type

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

Member Functions

Name

Description

decltype [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.

Data Members

Name

Description

noexcept

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.

Requirements

Header: boost/asio/associated_allocator.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext