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 for the latest Boost documentation.
PrevUpHomeNext

Struct template uses_allocator

boost::container::uses_allocator

Synopsis

// In header: <boost/container/scoped_allocator.hpp>

template<typename T, typename Alloc> 
struct uses_allocator {
};

Description

Remark: Automatically detects if T has a nested allocator_type that is convertible from Alloc. Meets the BinaryTypeTrait requirements ([meta.rqmts] 20.4.1). A program may specialize this type to derive from true_type for a T of user-defined type if T does not have a nested allocator_type but is nonetheless constructible using the specified Alloc.

Result: derived from true_type if Convertible<Alloc,T::allocator_type> and derived from false_type otherwise.


PrevUpHomeNext