Quick Links:

bal | bbl | bdl | bsl

Classes | Public Types | Public Member Functions

bsl::allocator< TYPE > Class Template Reference
[Component bslma_stdallocator]

#include <bslma_stdallocator.h>

List of all members.

Classes

struct  rebind

Public Types

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, bsl::is_trivially_copyable)
 BSLMF_NESTED_TRAIT_DECLARATION (allocator, BloombergLP::bslmf::IsBitwiseMoveable)
 BSLMF_NESTED_TRAIT_DECLARATION (allocator, BloombergLP::bslmf::IsBitwiseEqualityComparable)
 allocator ()
 allocator (BloombergLP::bslma::Allocator *mechanism)
 allocator (const allocator &original)
template<class ANY_TYPE >
 allocator (const allocator< ANY_TYPE > &rhs)
 ~allocator ()
allocatoroperator= (const allocator &rhs)
pointer allocate (size_type n, const void *hint=0)
void deallocate (pointer p, size_type n=1)
template<class ELEMENT_TYPE , class... Args>
void construct (ELEMENT_TYPE *address, Args &&...arguments)
template<class ELEMENT_TYPE >
void destroy (ELEMENT_TYPE *address)
pointer address (reference x) const
const_pointer address (const_reference x) const
size_type max_size () const
BloombergLP::bslma::Allocator * mechanism () const
allocator< TYPE > select_on_container_copy_construction () const

Detailed Description

template<class TYPE>
class bsl::allocator< TYPE >

An STL-compatible allocator that forwards allocation calls to an underlying mechanism object of a type derived from bslma::Allocator. This class template adheres to the allocator requirements defined in section 20.1.5 [lib.allocator.requirements] of the C++ standard and may be used to instantiate any [container] class template that follows the STL allocator protocol. The allocation mechanism is chosen at run-time, giving the programmer run-time control over how a container allocates and frees memory.

See Component bslma_stdallocator


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