BDE 4.14.0 Production release
|
#include <bsltf_stdallocatoradaptor.h>
Classes | |
struct | rebind |
Public Types | |
typedef ALLOCATOR::size_type | size_type |
typedef ALLOCATOR::difference_type | difference_type |
typedef ALLOCATOR::pointer | pointer |
typedef ALLOCATOR::const_pointer | const_pointer |
typedef ALLOCATOR::reference | reference |
typedef ALLOCATOR::const_reference | const_reference |
typedef ALLOCATOR::value_type | value_type |
Public Member Functions | |
BSLMF_NESTED_TRAIT_DECLARATION (StdAllocatorAdaptor, bslma::IsStdAllocator) | |
StdAllocatorAdaptor () | |
StdAllocatorAdaptor (const ALLOCATOR &allocator) | |
StdAllocatorAdaptor (bsl::nullptr_t) | |
template<class ANY_TYPE > | |
StdAllocatorAdaptor (const StdAllocatorAdaptor< ANY_TYPE > &other) | |
Create a copy of the specified other allocator adaptor. | |
StdAllocatorAdaptor (const StdAllocatorAdaptor &original)=default | |
~StdAllocatorAdaptor ()=default | |
StdAllocatorAdaptor & | operator= (const StdAllocatorAdaptor &rhs)=default |
template<class ELEMENT_TYPE , class... Args> | |
void | construct (ELEMENT_TYPE *address, Args &&... arguments) |
const ALLOCATOR & | allocator () const |
StdAllocatorAdaptor< ALLOCATOR > | select_on_container_copy_construction () const |
This class template provides the facade of an allocator but mostly delegates operations to the allocator object (of template parameter type) it adapts, except that it enables the propagation of the (stateful) allocator object to constructed elements, if appropriate.
typedef ALLOCATOR::const_pointer bsltf::StdAllocatorAdaptor< ALLOCATOR >::const_pointer |
typedef ALLOCATOR::const_reference bsltf::StdAllocatorAdaptor< ALLOCATOR >::const_reference |
typedef ALLOCATOR::difference_type bsltf::StdAllocatorAdaptor< ALLOCATOR >::difference_type |
typedef ALLOCATOR::pointer bsltf::StdAllocatorAdaptor< ALLOCATOR >::pointer |
typedef ALLOCATOR::reference bsltf::StdAllocatorAdaptor< ALLOCATOR >::reference |
typedef ALLOCATOR::size_type bsltf::StdAllocatorAdaptor< ALLOCATOR >::size_type |
typedef ALLOCATOR::value_type bsltf::StdAllocatorAdaptor< ALLOCATOR >::value_type |
|
inline |
Create a standard allocator adaptor object for a default-constructed allocator object of the (template parameter) type ALLOCATOR
.
|
inlineexplicit |
Create a standard allocator adaptor object for the specified allocator
of the (template parameter) type ALLOCATOR
.
|
inlineexplicit |
Create a standard allocator adaptor object from the null pointer constant.
|
inline |
|
default |
|
default |
|
inline |
Return a reference to the non-modifiable allocator instance associated with this standard allocator adaptor.
bsltf::StdAllocatorAdaptor< ALLOCATOR >::BSLMF_NESTED_TRAIT_DECLARATION | ( | StdAllocatorAdaptor< ALLOCATOR > | , |
bslma::IsStdAllocator | |||
) |
|
inline |
Construct an object of the (template parameter) ELEMENT_TYPE
, by forwarding the allocator instance associated with this allocator adaptor, if appropriate, and the specified (variable number of) arguments
to the corresponding constructor of ELEMENT_TYPE
, at the specified uninitialized memory address
. The behavior is undefined unless address
is properly aligned for objects of ELEMENT_TYPE
.
|
default |
|
inline |
Return an allocator adaptor for the allocator object returned by the select_on_container_copy_construction
class method in the allocator_traits
class template for the allocator object, of the (template parameter) type ALLOCATOR
, associated with this adaptor. The allocator_traits
class template presumably delegates this call to the allocator object if such an operation is supported by the ALLOCATOR
type, or provides a suitable default behavior if such an operation is not supported.