[#BloombergLP-bsltf-StdTestAllocator-05] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::StdTestAllocator :relfileprefix: ../../ :mrdocs: Minimal C++03‐compliant allocator that delegates to a global allocator. == Synopsis Declared in `<bsltf_stdtestallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> class StdTestAllocator; ---- == Description This allocator implements the minimal interface to comply with section 20.1.5 ([lib.allocator.requirements]) of the C++03 standard. Instances of this allocator delegate their operations to a globally configured delegate allocator as C++03 compliant allocators cannot have individually identifiable state (see `StdTestAllocatorConfiguration` and 'StdTestAllocatorConfigurationGuard). == Types [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/StdTestAllocator-05/rebind.adoc[`rebind`] | Provide a namespace for a rebound `StdTestAllocator` type. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/StdTestAllocator-05/const_pointer.adoc[`const_pointer`] | Alias for a pointer to `const TYPE`. | xref:BloombergLP/bsltf/StdTestAllocator-05/const_reference.adoc[`const_reference`] | Alias for a reference to `const TYPE`. | xref:BloombergLP/bsltf/StdTestAllocator-05/difference_type.adoc[`difference_type`] | Alias for `bsls::Types::IntPtr`. | xref:BloombergLP/bsltf/StdTestAllocator-05/pointer.adoc[`pointer`] | Alias for a pointer to `TYPE`. | xref:BloombergLP/bsltf/StdTestAllocator-05/reference.adoc[`reference`] | Alias for a reference to `TYPE`. | xref:BloombergLP/bsltf/StdTestAllocator-05/size_type.adoc[`size_type`] | Alias for `bsls::Types::UintPtr`. | xref:BloombergLP/bsltf/StdTestAllocator-05/value_type.adoc[`value_type`] | Alias for the allocated `TYPE`. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/StdTestAllocator-05/2constructor-0b.adoc[`StdTestAllocator`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bsltf/StdTestAllocator-05/address-0a.adoc[`address`] | `address` overloads | xref:BloombergLP/bsltf/StdTestAllocator-05/allocate.adoc[`allocate`] | Allocate space for the specified `numElements` objects of type `TYPE`. | xref:BloombergLP/bsltf/StdTestAllocator-05/construct.adoc[`construct`] | Construct an `ELEMENT_TYPE` object at the specified `address`. | xref:BloombergLP/bsltf/StdTestAllocator-05/deallocate.adoc[`deallocate`] | Return memory previously allocated at the specified `address`. | xref:BloombergLP/bsltf/StdTestAllocator-05/destroy.adoc[`destroy`] | Call the `ELEMENT_TYPE` destructor for the object at the specified `address` but do not deallocate the memory at `address`. | xref:BloombergLP/bsltf/StdTestAllocator-05/max_size.adoc[`max_size`] | Return the maximum number of `TYPE` elements this allocator can allocate. | xref:BloombergLP/bsltf/StdTestAllocator-05/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<StdTestAllocator, IsStdAllocator>`] | Declare `StdTestAllocator` as a standard allocator. |=== == Specializations [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/StdTestAllocator-0e.adoc[`StdTestAllocator<void>`] | This specialization of `StdTestAllocator` for `void` type as the parameterized `TYPE` does not contain members that are unrepresentable for `void`. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/operator_not_eq-0e.adoc[`operator!=`] | Return `false` because `StdTestAllocator` does not hold a state. | xref:BloombergLP/bsltf/operator_eq-0e5.adoc[`operator==`] | Return `true` because `StdTestAllocator` does not hold a state. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#