An STL‐compatible allocator that forwards to a bslma::Allocator.
Synopsis
Declared in <bslma_bslallocator.h>
template<class TYPE = polymorphic_allocator<>::value_type>
class allocator
: public polymorphic_allocator<TYPE>
Description
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 [allocator.requirements]and implements a superset of the std::pmr::polymorphic_allocator class template described in section [mem.poly.allocator.class]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.
Base Classes
Name |
Description |
Alias for |
Types
Name |
Description |
Rebind this allocator to another type. |
Type Aliases
Name |
Description |
This |
|
This |
|
This |
|
Difference type for allocations from this allocator. |
|
This |
|
This |
|
Size type for allocations from this allocator. |
|
This |
|
This |
Member Functions
Name |
Description |
|
Create an allocator that uses the default allocator mechanism. |
|
Create an allocator that copies |
|
Create an allocator sharing the mechanism of the specified |
|
Convert a |
Assign this allocator from the specified |
|
Return the address of the specified object |
|
Return the address of the specified object |
|
Return storage for |
|
Default‐construct an |
|
Construct an |
|
Construct an |
|
Deallocate the memory block at the specified |
|
Call the destructor for the object at the specified |
|
Return the maximum number of elements allocatable by this allocator. |
|
Return a pointer to the mechanism object to which this proxy forwards allocation and deallocation calls. |
|
|
Return a default‐constructed allocator. |
|
Return a tag declaring that this allocator is bitwise copyable. |
|
Declare that |
Specializations
Name |
Description |
Specialization of |
Non-Member Functions
Name |
Description |
Format |
|
Format |
|
Format |
|
Format |
|
Format |
|
Format |
|
Format |
|
Format |
|
|
Format |
|
Format |
|
Format |
|
Format |
Derived Classes
Name |
Description |
Specialization of |
Created with MrDocs