| Home | Libraries | People | FAQ | More

## Struct template uses_allocator

boost::container::uses_allocator

## Synopsis

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

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

## Description

Remark: Automatically detects if T has a nested allocator_type that is convertible from Allocator. Meets the BinaryTypeTrait requirements ([meta.rqmts] 20.4.1). A program may specialize this type to define uses_allocator<X>::value as true for a T of user-defined type if T does not have a nested allocator_type but is nonetheless constructible using the specified Allocator.

Result: uses_allocator<T, Allocator>::value== true if Convertible<Allocator,T::allocator_type>, false otherwise.