...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::container::uses_allocator
// In header: <boost/container/scoped_allocator_fwd.hpp> template<typename T, typename Allocator> struct uses_allocator { };
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.