Quick Links: |
#include <bslma_stdallocator.h>
Public Types | |
typedef allocator< ELEMENT_TYPE > | allocator_type |
typedef allocator < ELEMENT_TYPE >::value_type | value_type |
typedef BloombergLP::bslma::AllocatorTraits_PointerType < allocator< ELEMENT_TYPE > >::type | pointer |
typedef BloombergLP::bslma::AllocatorTraits_ConstPointerType < allocator< ELEMENT_TYPE > >::type | const_pointer |
typedef BloombergLP::bslma::AllocatorTraits_VoidPointerType < allocator< ELEMENT_TYPE > >::type | void_pointer |
typedef BloombergLP::bslma::AllocatorTraits_ConstVoidPointerType < allocator< ELEMENT_TYPE > >::type | const_void_pointer |
typedef BloombergLP::bslma::AllocatorTraits_DifferenceType < allocator< ELEMENT_TYPE > >::type | difference_type |
typedef BloombergLP::bslma::AllocatorTraits_SizeType < allocator< ELEMENT_TYPE > >::type | size_type |
typedef BloombergLP::bslma::AllocatorTraits_IsAlwaysEqual < allocator< ELEMENT_TYPE > >::type | is_always_equal |
typedef BloombergLP::bslma::AllocatorTraits_PropOnCopyAssign < allocator< ELEMENT_TYPE > >::type | propagate_on_container_copy_assignment |
typedef BloombergLP::bslma::AllocatorTraits_PropOnMoveAssign < allocator< ELEMENT_TYPE > >::type | propagate_on_container_move_assignment |
typedef BloombergLP::bslma::AllocatorTraits_PropOnSwap < allocator< ELEMENT_TYPE > >::type | propagate_on_container_swap |
Static Public Member Functions | |
static pointer | allocate (allocator< ELEMENT_TYPE > &basicAllocator, size_type n) |
static pointer | allocate (allocator< ELEMENT_TYPE > &basicAllocator, size_type n, const_void_pointer hint) |
static void | deallocate (allocator< ELEMENT_TYPE > &basicAllocator, pointer elementAddr, size_type n) |
static void | construct (allocator< ELEMENT_TYPE > &basicAllocator, ELEMENT_TYPE *elementAddr, Args &&...arguments) |
static void | destroy (allocator< ELEMENT_TYPE > &basicAllocator, ELEMENT_TYPE *elementAddr) |
static size_type | max_size (const allocator< ELEMENT_TYPE > &basicAllocator) BSLS_KEYWORD_NOEXCEPT |
static allocator< ELEMENT_TYPE > | select_on_container_copy_construction (const allocator< ELEMENT_TYPE > &rhs) |
typedef allocator< ELEMENT_TYPE > bsl::allocator_traits< allocator< ELEMENT_TYPE > >::allocator_type [inherited] |
typedef allocator< ELEMENT_TYPE > ::value_type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::value_type [inherited] |
typedef BloombergLP::bslma::AllocatorTraits_PointerType<allocator< ELEMENT_TYPE > >::type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::pointer [inherited] |
typedef BloombergLP::bslma::AllocatorTraits_ConstPointerType<allocator< ELEMENT_TYPE > >::type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::const_pointer [inherited] |
typedef BloombergLP::bslma::AllocatorTraits_VoidPointerType<allocator< ELEMENT_TYPE > >::type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::void_pointer [inherited] |
typedef BloombergLP::bslma:: AllocatorTraits_ConstVoidPointerType<allocator< ELEMENT_TYPE > >::type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::const_void_pointer [inherited] |
typedef BloombergLP::bslma::AllocatorTraits_DifferenceType<allocator< ELEMENT_TYPE > >::type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::difference_type [inherited] |
typedef BloombergLP::bslma::AllocatorTraits_SizeType<allocator< ELEMENT_TYPE > >::type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::size_type [inherited] |
typedef BloombergLP::bslma::AllocatorTraits_IsAlwaysEqual< allocator< ELEMENT_TYPE > >::type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::is_always_equal [inherited] |
typedef BloombergLP::bslma::AllocatorTraits_PropOnCopyAssign< allocator< ELEMENT_TYPE > >::type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::propagate_on_container_copy_assignment [inherited] |
typedef BloombergLP::bslma::AllocatorTraits_PropOnMoveAssign< allocator< ELEMENT_TYPE > >::type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::propagate_on_container_move_assignment [inherited] |
typedef BloombergLP::bslma::AllocatorTraits_PropOnSwap< allocator< ELEMENT_TYPE > >::type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::propagate_on_container_swap [inherited] |
static pointer bsl::allocator_traits< allocator< ELEMENT_TYPE > >::allocate | ( | allocator< ELEMENT_TYPE > & | basicAllocator, | |
size_type | n | |||
) | [static, inherited] |
Return basicAllocator.allocate(n)
.
static pointer bsl::allocator_traits< allocator< ELEMENT_TYPE > >::allocate | ( | allocator< ELEMENT_TYPE > & | basicAllocator, | |
size_type | n, | |||
const_void_pointer | hint | |||
) | [static, inherited] |
Return basicAllocator.allocate(n, hint)
.
static void bsl::allocator_traits< allocator< ELEMENT_TYPE > >::deallocate | ( | allocator< ELEMENT_TYPE > & | basicAllocator, | |
pointer | elementAddr, | |||
size_type | n | |||
) | [static, inherited] |
Invoke basicAllocator.deallocate(elementAddr, n)
. The behavior is undefined unless the specified elementAddr
was returned from a prior call to the allocate
method of an allocator that compares equal to the specified allocator
, and has not yet been passed to a deallocate
call of such an allocator object.
static void bsl::allocator_traits< allocator< ELEMENT_TYPE > >::construct | ( | allocator< ELEMENT_TYPE > & | basicAllocator, | |
ELEMENT_TYPE * | elementAddr, | |||
Args &&... | arguments | |||
) | [static, inherited] |
Construct an object of (template parameter) type ELEMENT_TYPE
at the specified elementAddr
, either by 1) calling the construct
method on basicAllocator
with elemAddr
and the specified (variable number of) arguments
if the (template parameter) type ALLOCATOR_TYPE
defines such a method, or 2) forwarding the specified (variable number of) arguments
to the constructor of ELEMENT_TYPE
directly (and ignoring basicAllocator
) otherwise. The behavior is undefined unless elementAddr
refers to valid, uninitialized storage.
static void bsl::allocator_traits< allocator< ELEMENT_TYPE > >::destroy | ( | allocator< ELEMENT_TYPE > & | basicAllocator, | |
ELEMENT_TYPE * | elementAddr | |||
) | [static, inherited] |
Destroy the object of (template parameter) type ELEMENT_TYPE
at the specified elementAddr
, either by 1) calling the destroy
method on basicAllocator
with elemAddr
as the sole argument if the (template parameter) type ALLOCATOR_TYPE
defines such a method, or 2) calling the destructor directly on elementAddr
(and ignoring basicAllocator
) otherwise. The behavior is undefined unless elementAddr
refers to a valid, constructed object.
static size_type bsl::allocator_traits< allocator< ELEMENT_TYPE > >::max_size | ( | const allocator< ELEMENT_TYPE > & | basicAllocator | ) | [static, inherited] |
Return the largest number of value_type
objects that could reasonably be returned by a single invocation of allocate
for the specified allocator
, i.e., allocator.max_size()
.
static allocator< ELEMENT_TYPE > bsl::allocator_traits< allocator< ELEMENT_TYPE > >::select_on_container_copy_construction | ( | const allocator< ELEMENT_TYPE > & | rhs | ) | [static, inherited] |
Return a copy of the allocator that should be used to copy- construct one container from another container whose allocator is the specified rhs
. If the parameterized ALLOCATOR_TYPE
defines a method select_on_container_copy_construction
, this function returns the result of calling that method on rhs
; otherwise, this method enforces the default policy of propagating the allocator on copy construction, as is standard practice for standard allocators (i.e., returns rhs
). Note that the specialization of this class template for bsl::allocator
(in the bslma_stdallocator
component) provides the alternate default behavior of not propagating the allocator on copy construction (i.e., returning a default-constructed allocator object).