Boost C++ Libraries Home Libraries People FAQ More

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