BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsl::allocator< void > Class Reference

#include <bslma_bslallocator.h>

Inheritance diagram for bsl::allocator< void >:
bsl::allocator< BloombergLP::bslma::BslAllocator_Voidish > bsl::polymorphic_allocator< TYPE >

Public Types

typedef void * pointer
 
typedef const void * const_pointer
 
typedef void * void_pointer
 
typedef const void * const_void_pointer
 
typedef void value_type
 
- Public Types inherited from bsl::allocator< BloombergLP::bslma::BslAllocator_Voidish >
typedef BloombergLP::bslma::BslAllocator_Voidish value_type
 
typedef value_typereference
 
typedef value_type const & const_reference
 
typedef BaseTraits::size_type size_type
 
typedef BaseTraits::difference_type difference_type
 
typedef BaseTraits::pointer pointer
 
typedef BaseTraits::const_pointer const_pointer
 
typedef BaseTraits::void_pointer void_pointer
 
typedef BaseTraits::const_void_pointer const_void_pointer
 
- Public Types inherited from bsl::polymorphic_allocator< TYPE >
typedef std::size_t size_type
 
typedef std::ptrdiff_t difference_type
 
typedef TYPE * pointer
 
typedef const TYPE * const_pointer
 
typedef TYPE & reference
 
typedef const TYPE & const_reference
 
typedef TYPE value_type
 

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (allocator, BloombergLP::bslmf::IsBitwiseCopyable)
 
 BSLMF_NESTED_TRAIT_DECLARATION (allocator, BloombergLP::bslmf::IsBitwiseEqualityComparable)
 
 allocator ()
 
 allocator (BloombergLP::bslma::Allocator *mechanism)
 
 allocator (const allocator &original) BSLS_KEYWORD_NOEXCEPT
 
template<class ANY_TYPE >
 allocator (const allocator< ANY_TYPE > &original) BSLS_KEYWORD_NOEXCEPT
 
 ~allocator ()
 
allocatoroperator= (const allocator &rhs)=default
 
allocator select_on_container_copy_construction () const
 Return a default-constructed allocator.
 
- Public Member Functions inherited from bsl::allocator< BloombergLP::bslma::BslAllocator_Voidish >
 BSLMF_NESTED_TRAIT_DECLARATION (allocator, BloombergLP::bslmf::IsBitwiseCopyable)
 
 BSLMF_NESTED_TRAIT_DECLARATION (allocator, BloombergLP::bslmf::IsBitwiseEqualityComparable)
 
 allocator ()
 
 allocator (BloombergLP::bslma::Allocator *mechanism)
 
 allocator (const allocator &original) BSLS_KEYWORD_NOEXCEPT
 
 allocator (const allocator< ANY_TYPE > &original) BSLS_KEYWORD_NOEXCEPT
 
 ~allocator ()=default
 
BSLMA_BSLALLOCATOR_DEPRECATE_ASSIGN allocatoroperator= (const allocator &rhs)
 
BSLS_ANNOTATION_NODISCARD pointer allocate (size_type n, const void *hint=0)
 
void deallocate (BloombergLP::bslma::BslAllocator_Voidish *p, std::size_t n=1)
 
void construct (ELEMENT_TYPE *address)
 
void construct (ELEMENT_TYPE *address, ARG1 &argument1, ARGS &&... arguments)
 
void construct (ELEMENT_TYPE *address, BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1, ARGS &&... arguments)
 
void destroy (ELEMENT_TYPE *address)
 
pointer address (reference x) const
 
const_pointer address (const_reference x) const
 
BSLS_KEYWORD_CONSTEXPR size_type max_size () const
 
BloombergLP::bslma::Allocator * mechanism () const
 
allocator select_on_container_copy_construction () const
 Return a default-constructed allocator.
 
- Public Member Functions inherited from bsl::polymorphic_allocator< TYPE >
 polymorphic_allocator () BSLS_KEYWORD_NOEXCEPT
 
 polymorphic_allocator (memory_resource *r)
 
 polymorphic_allocator (const polymorphic_allocator &original) BSLS_KEYWORD_NOEXCEPT
 
template<class ANY_TYPE >
 polymorphic_allocator (const polymorphic_allocator< ANY_TYPE > &original) BSLS_KEYWORD_NOEXCEPT
 
 ~polymorphic_allocator ()=default
 
BSLS_ANNOTATION_NODISCARD TYPE * allocate (std::size_t n)
 
void deallocate (TYPE *p, std::size_t n)
 
template<class ELEMENT_TYPE >
void construct (ELEMENT_TYPE *address)
 
template<class ELEMENT_TYPE , class ARG1 , class... ARGS>
void construct (ELEMENT_TYPE *address, ARG1 &argument1, ARGS &&... arguments)
 
template<class ELEMENT_TYPE , class ARG1 , class... ARGS>
void construct (ELEMENT_TYPE *address, BSLS_COMPILERFEATURES_FORWARD_REF(ARG1) argument1, ARGS &&... arguments)
 
template<class ELEMENT_TYPE >
void destroy (ELEMENT_TYPE *address)
 
pointer address (reference x) const
 
const_pointer address (const_reference x) const
 
BSLS_KEYWORD_CONSTEXPR size_type max_size () const
 
memory_resourceresource () const
 Return the address of the memory resource supplied on construction.
 
polymorphic_allocator select_on_container_copy_construction () const
 Return a default-constructed polymorphic_allocator.
 

Detailed Description

Specialization of allocator<T> where T is void. Does not contain members that are unrepresentable for void. Note that this specialization may be removed in the future. Use allocator<> or allocator<char> instead.

Member Typedef Documentation

◆ const_pointer

typedef const void* bsl::allocator< void >::const_pointer

◆ const_void_pointer

typedef const void* bsl::allocator< void >::const_void_pointer

◆ pointer

typedef void* bsl::allocator< void >::pointer

◆ value_type

typedef void bsl::allocator< void >::value_type

◆ void_pointer

typedef void* bsl::allocator< void >::void_pointer

Constructor & Destructor Documentation

◆ allocator() [1/4]

bsl::allocator< void >::allocator ( )
inline

Create a proxy object that will forward allocation calls to the object pointed to by bslma::Default::defaultAllocator(). Postcondition:

BloombergLP::bslma::Allocator * mechanism() const
Definition bslma_bslallocator.h:1126
static Allocator * defaultAllocator()
Definition bslma_default.h:889

◆ allocator() [2/4]

bsl::allocator< void >::allocator ( BloombergLP::bslma::Allocator *  mechanism)
inline

Convert a bslma::Allocator pointer to an allocator object that forwards allocation calls to the object pointed to by the specified mechanism. If mechanism is 0, then the currently installed default allocator is used instead. Postcondition:

static Allocator * allocator(Allocator *basicAllocator=0)
Definition bslma_default.h:897

◆ allocator() [3/4]

bsl::allocator< void >::allocator ( const allocator< void > &  original)
inline

◆ allocator() [4/4]

template<class ANY_TYPE >
bsl::allocator< void >::allocator ( const allocator< ANY_TYPE > &  original)
inline

Create a proxy object sharing the same mechanism object as the specified original. The newly constructed allocator will compare equal to original, even though they may be instantiated on different types. Postcondition:

this->mechanism() == original.mechanism();

◆ ~allocator()

bsl::allocator< void >::~allocator ( )

Destroy this object. Note that this does not delete the object pointed to by mechanism(). Also note that this method's definition is compiler generated.

Member Function Documentation

◆ BSLMF_NESTED_TRAIT_DECLARATION() [1/2]

bsl::allocator< void >::BSLMF_NESTED_TRAIT_DECLARATION ( allocator< void >  ,
BloombergLP::bslmf::IsBitwiseCopyable   
)

◆ BSLMF_NESTED_TRAIT_DECLARATION() [2/2]

bsl::allocator< void >::BSLMF_NESTED_TRAIT_DECLARATION ( allocator< void >  ,
BloombergLP::bslmf::IsBitwiseEqualityComparable   
)

◆ operator=()

allocator & bsl::allocator< void >::operator= ( const allocator< void > &  rhs)
default

◆ select_on_container_copy_construction()

allocator< void > bsl::allocator< void >::select_on_container_copy_construction ( ) const
inline

The documentation for this class was generated from the following file: