Metafunction that is true_type if TYPE uses the bslma allocator idiom.

Synopsis

Declared in <bslma_usesbslmaallocator.h>

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

Description

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.

Base Classes

Name

Description

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

Name

Description

type

Alias for this integral_constant specialization.

value_type

Alias for the (template parameter) t_TYPE.

Member Functions

Name

Description

operator()

Return a copy of the template argument t_VALUE.

operator t_TYPE

Return a copy of the template argument t_VALUE.

Static Data Members

Name

Description

value

The compile‐time constant value of this metafunction.

Specializations

Name

Description

UsesBslmaAllocator<bsltf::AllocBitwiseMoveableTestType>

Trait specialization: AllocBitwiseMoveableTestType uses bslma allocators.

UsesBslmaAllocator<bsltf::AllocEmplacableTestType>

Trait indicating AllocEmplacableTestType uses bslma allocators.

UsesBslmaAllocator<bdlc::BitArray>

This template specialization for UsesBslmaAllocator indicates that BitArray uses bslma::Allocator.

UsesBslmaAllocator<BloombergLP::bdlbb::Blob>

Specialize UsesBslmaAllocator to indicate that Blob uses a bslma allocator.

UsesBslmaAllocator<bslx::ByteOutStream>

Specialize UsesBslmaAllocator to indicate that ByteOutStream uses a bslma allocator.

UsesBslmaAllocator<bdlt::Calendar>

Trait indicating bdlt::Calendar uses bslma allocators.

UsesBslmaAllocator<bdlt::CalendarCache>

Trait indicating bdlt::CalendarCache uses bslma allocators.

UsesBslmaAllocator<balb::Choice1>

Specialize UsesBslmaAllocator to indicate that Choice1 uses a bslma allocator.

UsesBslmaAllocator<balb::Choice2>

Specialize UsesBslmaAllocator to indicate that Choice2 uses a bslma allocator.

UsesBslmaAllocator<balb::Choice3>

Specialize UsesBslmaAllocator to indicate that Choice3 uses a bslma allocator.

UsesBslmaAllocator<balb::Choice4>

Specialize UsesBslmaAllocator to indicate that Choice4 uses a bslma allocator.

UsesBslmaAllocator<balb::Choice5>

Specialize UsesBslmaAllocator to indicate that Choice5 uses a bslma allocator.

UsesBslmaAllocator<balb::CustomString>

Specialize UsesBslmaAllocator to indicate that CustomString uses a bslma allocator.

UsesBslmaAllocator<balxml::EncoderOptions>

Specialize UsesBslmaAllocator for EncoderOptions.

UsesBslmaAllocator<baljsn::EncoderTestAddress>

Specialize UsesBslmaAllocator for EncoderTestAddress.

UsesBslmaAllocator<baljsn::EncoderTestChoiceWithAllCategories>

Specialize UsesBslmaAllocator for EncoderTestChoiceWithAllCategories.

UsesBslmaAllocator<baljsn::EncoderTestChoiceWithAllCategoriesCustomizedType>

Specialize UsesBslmaAllocator for EncoderTestChoiceWithAllCategoriesCustomizedType.

UsesBslmaAllocator<baljsn::EncoderTestEmployee>

Specialize UsesBslmaAllocator for EncoderTestEmployee.

UsesBslmaAllocator<baljsn::EncoderTestSequenceWithAllCategories>

Specialize UsesBslmaAllocator for EncoderTestSequenceWithAllCategories.

UsesBslmaAllocator<baljsn::EncoderTestSequenceWithAllCategoriesCustomizedType>

Specialize UsesBslmaAllocator for EncoderTestSequenceWithAllCategoriesCustomizedType.

UsesBslmaAllocator<balb::FeatureTestMessage>

Specialize UsesBslmaAllocator to indicate that FeatureTestMessage uses a bslma allocator.

UsesBslmaAllocator<bsltf::MovableAllocTestType>

Specialize UsesBslmaAllocator to indicate that MovableAllocTestType uses a bslma allocator.

UsesBslmaAllocator<bsltf::MoveOnlyAllocTestType>

Specialize UsesBslmaAllocator to indicate that MoveOnlyAllocTestType uses a bslma allocator.

UsesBslmaAllocator<bsltf::NonOptionalAllocTestType>

Specialize UsesBslmaAllocator to indicate that NonOptionalAllocTestType uses a bslma allocator.

UsesBslmaAllocator<bdlt::PackedCalendar>

Trait indicating bdlt::PackedCalendar uses bslma allocators.

UsesBslmaAllocator<bdlde::QuotedPrintableEncoder>

Specialize UsesBslmaAllocator to indicate that QuotedPrintableEncoder uses a bslma allocator.

UsesBslmaAllocator<balb::Request>

Specialize UsesBslmaAllocator to indicate that Request uses a bslma allocator.

UsesBslmaAllocator<balb::Response>

Specialize UsesBslmaAllocator to indicate that Response uses a bslma allocator.

UsesBslmaAllocator<balb::Sequence1>

Specialize UsesBslmaAllocator to indicate that Sequence1 uses a bslma allocator.

UsesBslmaAllocator<balb::Sequence2>

Specialize UsesBslmaAllocator to indicate that Sequence2 uses a bslma allocator.

UsesBslmaAllocator<balb::Sequence3>

Specialize UsesBslmaAllocator to indicate that Sequence3 uses a bslma allocator.

UsesBslmaAllocator<balb::Sequence4>

Specialize UsesBslmaAllocator to indicate that Sequence4 uses a bslma allocator.

UsesBslmaAllocator<balb::Sequence5>

Specialize UsesBslmaAllocator to indicate that Sequence5 uses a bslma allocator.

UsesBslmaAllocator<balb::Sequence6>

Specialize UsesBslmaAllocator to indicate that Sequence6 uses a bslma allocator.

UsesBslmaAllocator<balb::SequenceWithAnonymity>

Specialize UsesBslmaAllocator to indicate that SequenceWithAnonymity uses a bslma allocator.

UsesBslmaAllocator<balb::SequenceWithAnonymityChoice>

Specialize UsesBslmaAllocator to indicate that SequenceWithAnonymityChoice uses a bslma allocator.

UsesBslmaAllocator<balb::SequenceWithAnonymityChoice1>

Specialize UsesBslmaAllocator to indicate that SequenceWithAnonymityChoice1 uses a bslma allocator.

UsesBslmaAllocator<balb::SequenceWithAnonymityChoice2>

Specialize UsesBslmaAllocator to indicate that SequenceWithAnonymityChoice2 uses a bslma allocator.

UsesBslmaAllocator<balb::SimpleRequest>

Specialize UsesBslmaAllocator to indicate that SimpleRequest uses a bslma allocator.

UsesBslmaAllocator<bslx::TestOutStream>

Trait indicating bslx::TestOutStream uses bslma allocators.

UsesBslmaAllocator<bslmt::ThreadGroup>

Trait indicating bslmt::ThreadGroup uses bslma allocators.

UsesBslmaAllocator<bdlt::Timetable>

Trait indicating bdlt::Timetable uses bslma allocators.

UsesBslmaAllocator<bdlt::Timetable_Day>

Trait indicating bdlt::Timetable_Day uses bslma allocators.

UsesBslmaAllocator<bsltf::WellBehavedMoveOnlyAllocTestType>

Trait indicating WellBehavedMoveOnlyAllocTestType uses bslma allocators.

UsesBslmaAllocator<bsltf::AllocArgumentType<N>>

Specialize UsesBslmaAllocator to indicate that AllocArgumentType uses a bslma allocator.

UsesBslmaAllocator<bbldc::CalendarDateRangeDayCountAdapter<CONVENTION>>

Specialize UsesBslmaAllocator for CalendarDateRangeDayCountAdapter.

UsesBslmaAllocator<bdlc::CompactedArray<TYPE>>

This template specialization for UsesBslmaAllocator indicates that CompactedArray uses bslma::Allocator.

UsesBslmaAllocator<bdlc::CompactedArray_CountedValue<TYPE>>

This template specialization for UsesBslmaAllocator indicates that CompactedArray_CountedValue uses bslma::Allocator.

UsesBslmaAllocator<bdlma::DefaultDeleter<TYPE>>

This template specialization for UsesBslmaAllocator indicates that DefaultDeleter uses bslma::Allocator.

UsesBslmaAllocator<bdlcc::Deque<TYPE>>

Specialize UsesBslmaAllocator to indicate that bdlcc::Deque uses a bslma allocator.

UsesBslmaAllocator<bslstl::Optional_Base<t_TYPE, false>>

Trait specialization: non‐allocator‐aware Optional_Base does not use allocators.

UsesBslmaAllocator<bdlc::PackedIntArray<TYPE>>

This template specialization for UsesBslmaAllocator indicates that PackedIntArray uses bslma::Allocator.

UsesBslmaAllocator<bdlc::PackedIntArrayImp<STORAGE>>

This template specialization for UsesBslmaAllocator indicates that PackedIntArrayImp uses bslma::Allocator.

UsesBslmaAllocator<bbldc::PeriodDateRangeDayCountAdapter<CONVENTION>>

Specialize UsesBslmaAllocator for PeriodDateRangeDayCountAdapter.

UsesBslmaAllocator<SharedPtrInplaceRep<ELEMENT_TYPE>>

Trait specialization: SharedPtrInplaceRep does not use BDE allocators.

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>>

Trait specialization: optional uses allocators when t_TYPE does.

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>>

Trait specialization: shared_ptr does not use bslma allocators.

UsesBslmaAllocator<bsl::stop_callback<t_CALLBACK>>

Trait specialization: stop_callback uses allocators when t_CALLBACK does.

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 rejects pointer types as allocator‐aware.

UsesBslmaAllocator<bdlf::MemFnInstance<PROTOTYPE, INSTANCE>>

Trait indicating MemFnInstance uses bslma allocators.

UsesBslmaAllocator<bslstl::SharedPtrAllocateInplaceRep<TYPE, ALLOCATOR>>

Trait specialization: SharedPtrAllocateInplaceRep does not use BDE allocators.

UsesBslmaAllocator<bslstl::SharedPtrArrayAllocateInplaceRep<TYPE, ALLOCATOR>>

Trait specialization: SharedPtrArrayAllocateInplaceRep does not use BDE allocators.

UsesBslmaAllocator<SharedPtrOutofplaceRep_InitProctor<TYPE, DELETER>>

Specialize UsesBslmaAllocator to indicate that SharedPtrOutofplaceRep_InitProctor does not use a bslma allocator.

UsesBslmaAllocator<bsl::deque<VALUE_TYPE, ALLOCATOR>>

Trait indicating deque uses bslma allocators when ALLOCATOR allows.

UsesBslmaAllocator<bsl::list<VALUE, ALLOCATOR>>

Trait indicating bsl::list uses bslma allocators when ALLOCATOR allows.

UsesBslmaAllocator<bsl::pair<T1, T2>>

Trait indicating pair uses bslma allocators when either element does.

UsesBslmaAllocator<bsl::vector<VALUE_TYPE, ALLOCATOR>>

Trait indicating bsl::vector uses bslma allocators when ALLOCATOR allows.

UsesBslmaAllocator<BloombergLP::bslstl::BoyerMooreHorspoolSearcher<RNDACC_ITR_NEEDLE, HASH, EQUAL>>

Trait specialization: BoyerMooreHorspoolSearcher uses bslma allocators.

UsesBslmaAllocator<BloombergLP::bslstl::BoyerMooreHorspoolSearcher_CharImp<RNDACC_ITR_NEEDLE, HASH, EQUAL>>

Trait specialization: BoyerMooreHorspoolSearcher_CharImp uses bslma allocators.

UsesBslmaAllocator<BloombergLP::bslstl::BoyerMooreHorspoolSearcher_GeneralImp<RNDACC_ITR_NEEDLE, HASH, EQUAL>>

Trait specialization: BoyerMooreHorspoolSearcher_GeneralImp uses bslma allocators.

UsesBslmaAllocator<bdlc::FlatHashSet<KEY, HASH, EQUAL>>

Trait indicating bdlc::FlatHashSet uses bslma allocators.

UsesBslmaAllocator<bsl::basic_istringstream<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>>

Trait specialization: basic_istringstream uses bslma‐style allocators.

UsesBslmaAllocator<bsl::basic_ostringstream<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>>

Trait specialization: basic_ostringstream uses bslma‐style allocators.

UsesBslmaAllocator<bsl::basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOC>>

Trait indicating basic_string uses bslma allocators.

UsesBslmaAllocator<bsl::basic_stringbuf<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>>

Trait specialization: basic_stringbuf uses bslma‐style allocators.

UsesBslmaAllocator<bsl::basic_stringstream<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>>

Trait specialization: basic_stringstream uses bslma‐style allocators.

UsesBslmaAllocator<bsl::basic_syncbuf<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>>

Trait specialization: basic_syncbuf uses bslma‐style allocators.

UsesBslmaAllocator<bsl::multiset<KEY, COMPARATOR, ALLOCATOR>>

Trait indicating bsl::multiset uses bslma allocators.

UsesBslmaAllocator<bsl::set<KEY, COMPARATOR, ALLOCATOR>>

Trait indicating bsl::set uses bslma allocators when ALLOCATOR allows.

UsesBslmaAllocator<bdlcc::Cache<KEY, VALUE, HASH, EQUAL>>

Specialize UsesBslmaAllocator to indicate that bdlcc::Cache uses a bslma allocator.

UsesBslmaAllocator<bdlc::FlatHashMap<KEY, VALUE, HASH, EQUAL>>

Trait indicating FlatHashMap uses bslma allocators.

UsesBslmaAllocator<bslstl::HashTable<KEY_CONFIG, HASHER, COMPARATOR, ALLOCATOR>>

Trait indicating HashTable uses bslma allocators when ALLOCATOR allows.

UsesBslmaAllocator<bdlcc::StripedUnorderedContainerImpl<KEY, VALUE, HASH, EQUAL>>

Specialize UsesBslmaAllocator to indicate that bdlcc::StripedUnorderedContainerImpl uses a bslma allocator.

UsesBslmaAllocator<bdlcc::StripedUnorderedMap<KEY, VALUE, HASH, EQUAL>>

Specialize UsesBslmaAllocator to indicate that bdlcc::StripedUnorderedMap uses a bslma allocator.

UsesBslmaAllocator<bdlcc::StripedUnorderedMultiMap<KEY, VALUE, HASH, EQUAL>>

Specialize UsesBslmaAllocator to indicate that bdlcc::StripedUnorderedMultiMap uses a bslma allocator.

UsesBslmaAllocator<bsl::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc>>

Trait indicating hash_multiset uses bslma allocators when _Alloc allows.

UsesBslmaAllocator<bsl::hash_set<_Value, _HashFcn, _EqualKey, _Alloc>>

Trait indicating hash_set uses bslma allocators when _Alloc allows.

UsesBslmaAllocator<bsl::map<KEY, VALUE, COMPARATOR, ALLOCATOR>>

Trait indicating bsl::map uses bslma allocators when ALLOCATOR allows.

UsesBslmaAllocator<bsl::multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>>

Trait indicating bsl::multimap uses bslma allocators when ALLOCATOR allows.

UsesBslmaAllocator<bsl::unordered_multiset<KEY, HASH, EQUAL, ALLOCATOR>>

Trait indicating unordered_multiset uses bslma allocators.

UsesBslmaAllocator<bsl::unordered_set<KEY, HASH, EQUAL, ALLOCATOR>>

Trait indicating bsl::unordered_set uses bslma allocators when ALLOCATOR allows.

UsesBslmaAllocator<bdlc::FlatHashTable<KEY, ENTRY, ENTRY_UTIL, HASH, EQUAL>>

Specialize UsesBslmaAllocator to indicate that FlatHashTable uses a bslma allocator.

UsesBslmaAllocator<bsl::hash_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc>>

Trait indicating hash_map uses bslma allocators when _Alloc allows.

UsesBslmaAllocator<bsl::hash_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc>>

Trait indicating hash_multimap uses bslma allocators when _Alloc allows.

UsesBslmaAllocator<bsl::unordered_map<KEY, VALUE, HASH, EQUAL, ALLOCATOR>>

Trait indicating unordered_map uses bslma allocators when ALLOCATOR allows.

UsesBslmaAllocator<bsl::unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>>

Trait indicating unordered_multimap uses bslma allocators when ALLOCATOR allows.

Derived Classes

Name

Description

Metafunction

Metafunction that delegates to bslma::UsesBslmaAllocator.

UsesBslmaAllocator<bsl::optional<t_TYPE>>

Trait specialization: optional uses allocators when t_TYPE does.

UsesBslmaAllocator<bsl::stop_callback<t_CALLBACK>>

Trait specialization: stop_callback uses allocators when t_CALLBACK does.

Created with MrDocs