An STL‐compatible test allocator that forwards allocation calls to an underlying mechanism object of a type derived from bslma::TestAllocator. 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.
Synopsis
Declared in <bslma_stdtestallocator.h>
template<class TYPE>
class StdTestAllocator;
Types
Name |
Description |
This nested |
Type Aliases
Name |
Description |
Alias for a pointer to constant value type. |
|
Alias for a constant reference to the value type. |
|
Alias for the allocator difference type. |
|
Alias for a pointer to the value type. |
|
Alias for a modifiable reference to the value type. |
|
Alias for the allocator size type. |
|
Alias for the value type. |
Member Functions
Name |
Description |
|
Constructors |
Return the address of the object referred to by the specified |
|
Allocate enough (properly aligned) space for the specified |
|
Copy‐construct an object of (template parameter) |
|
Return memory previously allocated with |
|
Call the |
|
Return the maximum number of elements of (template parameter) |
|
Return a pointer to the mechanism object to which this proxy forwards allocation and deallocation calls. |
|
|
Declare |
|
Declare |
|
Declare |
|
Declare |
Non-Member Functions
Name |
Description |
Return |
|
Return |
|
Return |
|
Return |
Created with MrDocs