BloombergLP::bslma::UsesBslmaAllocator

This metafunction is derived from true_type if TYPE adheres to the bslma allocator usage idiom and false_type otherwise. Note that this trait must be explicitly associated with a type in order for this metafunction to return true; simply having a constructor that implicitly converts bslma::Allocator * to TYPE is deprecated as a means of indicating that a type follows the bslma allocator usage idiom.

Synopsis

Declared in <bslma_usesbslmaallocator.h>

template<class TYPE>
struct UsesBslmaAllocator
    : bsl::integral_constant<bool, UsesBslmaAllocator_Imp<TYPE>::value>

Base Classes

NameDescription
bsl::integral_constant<bool, UsesBslmaAllocator_Imp<TYPE>::value>Metafunction representing a compile-time constant of the specified (template parameter) t_TYPE with the specified (template parameter) t_VALUE.

Type Aliases

NameDescription
type Alias for this integral_constant specialization.
value_type

Member Functions

NameDescription
operator() Return a copy of the template argument t_VALUE.
operator value_type

Static Data Members

Name
value

Specializations

NameDescription
UsesBslmaAllocator<bsltf::AllocBitwiseMoveableTestType>
UsesBslmaAllocator<bsltf::AllocEmplacableTestType>
UsesBslmaAllocator<bdlc::BitArray> This template specialization for UsesBslmaAllocator indicates that BitArray uses bslma::Allocator.
UsesBslmaAllocator<BloombergLP::bdlbb::Blob>
UsesBslmaAllocator<bslx::ByteOutStream>
UsesBslmaAllocator<bdlt::Calendar>
UsesBslmaAllocator<bdlt::CalendarCache>
UsesBslmaAllocator<balb::Choice1>
UsesBslmaAllocator<balb::Choice2>
UsesBslmaAllocator<balb::Choice3>
UsesBslmaAllocator<balb::Choice4>
UsesBslmaAllocator<balb::Choice5>
UsesBslmaAllocator<balb::CustomString>
UsesBslmaAllocator<balxml::EncoderOptions>
UsesBslmaAllocator<baljsn::EncoderTestAddress>
UsesBslmaAllocator<baljsn::EncoderTestChoiceWithAllCategories>
UsesBslmaAllocator<baljsn::EncoderTestChoiceWithAllCategoriesCustomizedType>
UsesBslmaAllocator<baljsn::EncoderTestEmployee>
UsesBslmaAllocator<baljsn::EncoderTestSequenceWithAllCategories>
UsesBslmaAllocator<baljsn::EncoderTestSequenceWithAllCategoriesCustomizedType>
UsesBslmaAllocator<balb::FeatureTestMessage>
UsesBslmaAllocator<bsltf::MovableAllocTestType>
UsesBslmaAllocator<bsltf::MoveOnlyAllocTestType>
UsesBslmaAllocator<bsltf::NonOptionalAllocTestType>
UsesBslmaAllocator<bdlt::PackedCalendar>
UsesBslmaAllocator<bdlde::QuotedPrintableEncoder>
UsesBslmaAllocator<balb::Request>
UsesBslmaAllocator<balb::Response>
UsesBslmaAllocator<balb::Sequence1>
UsesBslmaAllocator<balb::Sequence2>
UsesBslmaAllocator<balb::Sequence3>
UsesBslmaAllocator<balb::Sequence4>
UsesBslmaAllocator<balb::Sequence5>
UsesBslmaAllocator<balb::Sequence6>
UsesBslmaAllocator<balb::SequenceWithAnonymity>
UsesBslmaAllocator<balb::SequenceWithAnonymityChoice>
UsesBslmaAllocator<balb::SequenceWithAnonymityChoice1>
UsesBslmaAllocator<balb::SequenceWithAnonymityChoice2>
UsesBslmaAllocator<balb::SimpleRequest>
UsesBslmaAllocator<bslx::TestOutStream>
UsesBslmaAllocator<bslmt::ThreadGroup>
UsesBslmaAllocator<bdlt::Timetable>
UsesBslmaAllocator<bdlt::Timetable_Day>
UsesBslmaAllocator<bsltf::WellBehavedMoveOnlyAllocTestType>
UsesBslmaAllocator<bsltf::AllocArgumentType<N>>
UsesBslmaAllocator<bbldc::CalendarDateRangeDayCountAdapter<CONVENTION>>
UsesBslmaAllocator<bdlc::CompactedArray<TYPE>>
UsesBslmaAllocator<bdlc::CompactedArray_CountedValue<TYPE>>
UsesBslmaAllocator<bdlma::DefaultDeleter<TYPE>>
UsesBslmaAllocator<bdlcc::Deque<TYPE>>
UsesBslmaAllocator<bslstl::Optional_Base<t_TYPE, false>>
UsesBslmaAllocator<bdlc::PackedIntArray<TYPE>>
UsesBslmaAllocator<bdlc::PackedIntArrayImp<STORAGE>>
UsesBslmaAllocator<bbldc::PeriodDateRangeDayCountAdapter<CONVENTION>>
UsesBslmaAllocator<SharedPtrInplaceRep<ELEMENT_TYPE>> The class template SharedPtrInplaceRep appears to use allocators, but passes its allocator argument in the first position, rather than in the last position, so is not compatible with BDE APIs that use this trait.
UsesBslmaAllocator<bsl::allocator<TYPE>> An allocator is not itself an allocator-aware type, even though it is convertible from bsl::Allocator *.
UsesBslmaAllocator<bsl::optional<t_TYPE>>
UsesBslmaAllocator<bsl::polymorphic_allocator<TYPE>> An allocator is not itself an allocator-aware type, even though it is convertible from bsl::Allocator *.
UsesBslmaAllocator<bsl::shared_ptr<ELEMENT_TYPE>>
UsesBslmaAllocator<bsl::stop_callback<t_CALLBACK>>
UsesBslmaAllocator<TYPE volatile> Partial specialization that associates the same trait with 'volatile TYPE' as with unqualified TYPE.
UsesBslmaAllocator<TYPE const> Partial specialization that associates the same trait with const TYPE as with unqualified TYPE.
UsesBslmaAllocator<TYPE const volatile> Partial specialization that associates the same trait with 'const volatile TYPE' as with unqualified TYPE.
UsesBslmaAllocator<TYPE&> Partial specialization that prevents any lvalue reference from being considered an allocator-aware (AA) type.
UsesBslmaAllocator<TYPE&&> Partial specialization that prevents any rvalue reference from being considered an allocator-aware (AA) type.
UsesBslmaAllocator<TYPE*> Partial specialization that prevents any pointer from being considered an allocator-aware (AA) type, including pointers that are convertible to bslma::Allocator *.
UsesBslmaAllocator<bdlf::MemFnInstance<PROTOTYPE, INSTANCE>>
UsesBslmaAllocator<bslstl::SharedPtrAllocateInplaceRep<TYPE, ALLOCATOR>>
UsesBslmaAllocator<bslstl::SharedPtrArrayAllocateInplaceRep<TYPE, ALLOCATOR>>
UsesBslmaAllocator<SharedPtrOutofplaceRep_InitProctor<TYPE, DELETER>>
UsesBslmaAllocator<bsl::deque<VALUE_TYPE, ALLOCATOR>>
UsesBslmaAllocator<bsl::list<VALUE, ALLOCATOR>>
UsesBslmaAllocator<bsl::pair<T1, T2>>
UsesBslmaAllocator<bsl::vector<VALUE_TYPE, ALLOCATOR>>
UsesBslmaAllocator<BloombergLP::bslstl::BoyerMooreHorspoolSearcher<RNDACC_ITR_NEEDLE, HASH, EQUAL>>
UsesBslmaAllocator<BloombergLP::bslstl::BoyerMooreHorspoolSearcher_CharImp<RNDACC_ITR_NEEDLE, HASH, EQUAL>>
UsesBslmaAllocator<BloombergLP::bslstl::BoyerMooreHorspoolSearcher_GeneralImp<RNDACC_ITR_NEEDLE, HASH, EQUAL>>
UsesBslmaAllocator<bdlc::FlatHashSet<KEY, HASH, EQUAL>>
UsesBslmaAllocator<bsl::basic_istringstream<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>>
UsesBslmaAllocator<bsl::basic_ostringstream<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>>
UsesBslmaAllocator<bsl::basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOC>>
UsesBslmaAllocator<bsl::basic_stringbuf<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>>
UsesBslmaAllocator<bsl::basic_stringstream<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>>
UsesBslmaAllocator<bsl::basic_syncbuf<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>>
UsesBslmaAllocator<bsl::multiset<KEY, COMPARATOR, ALLOCATOR>>
UsesBslmaAllocator<bsl::set<KEY, COMPARATOR, ALLOCATOR>>
UsesBslmaAllocator<bdlcc::Cache<KEY, VALUE, HASH, EQUAL>>
UsesBslmaAllocator<bdlc::FlatHashMap<KEY, VALUE, HASH, EQUAL>>
UsesBslmaAllocator<bslstl::HashTable<KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR>>
UsesBslmaAllocator<bdlcc::StripedUnorderedContainerImpl<KEY, VALUE, HASH, EQUAL>>
UsesBslmaAllocator<bdlcc::StripedUnorderedMap<KEY, VALUE, HASH, EQUAL>>
UsesBslmaAllocator<bdlcc::StripedUnorderedMultiMap<KEY, VALUE, HASH, EQUAL>>
UsesBslmaAllocator<bsl::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>>
UsesBslmaAllocator<bsl::hash_set<_Value, _HashFcn, _EqualKey, _Alloc>>
UsesBslmaAllocator<bsl::map<KEY, VALUE, COMPARATOR, ALLOCATOR>>
UsesBslmaAllocator<bsl::multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>>
UsesBslmaAllocator<bsl::unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>>
UsesBslmaAllocator<bsl::unordered_set<KEY, HASH, EQUAL, ALLOCATOR>>
UsesBslmaAllocator<bdlc::FlatHashTable<KEY, ENTRY, ENTRY_UTIL, HASH, EQUAL>>
UsesBslmaAllocator<bsl::hash_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc>>
UsesBslmaAllocator<bsl::hash_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc>>
UsesBslmaAllocator<bsl::unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>>
UsesBslmaAllocator<bsl::unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>>

Derived Classes

NameDescription
Metafunction Metafunction that delegates to bslma::UsesBslmaAllocator.
UsesBslmaAllocator<bsl::optional<t_TYPE>>
UsesBslmaAllocator<bsl::stop_callback<t_CALLBACK>>