[#BloombergLP-bsltf-StdAllocTestType] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::StdAllocTestType :relfileprefix: ../../ :mrdocs: This unconstrained (value‐semantic) attribute class uses a standard allocator of (template parameter) type `ALLOC` to allocate memory. This class does NOT define the type trait `bslma::UsesBslmaAllocator`, but the trait will be `true` if `ALLOC` is convertible from `bslma::Allocator *` (e.g., if it is an instantiation of `bsl::allocator`). This class is primarily provided to facilitate testing of templates by defining a simple type representative of user‐defined types using a standard allocator. See the section for information on the class attributes. == Synopsis Declared in `<bsltf_stdalloctesttype.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOC> class StdAllocTestType; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/StdAllocTestType/allocator_type.adoc[`allocator_type`] | Allocator type used by this test type (needed by `uses_allocator`). |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/StdAllocTestType/2constructor-0e.adoc[`StdAllocTestType`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bsltf/StdAllocTestType/2destructor.adoc[`~StdAllocTestType`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/bsltf/StdAllocTestType/operator_assign.adoc[`operator=`] | Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object. | xref:BloombergLP/bsltf/StdAllocTestType/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/bsltf/StdAllocTestType/data.adoc[`data`] | Return the value of the `data` attribute of this object. | xref:BloombergLP/bsltf/StdAllocTestType/setData.adoc[`setData`] | Set the `data` attribute of this object to the specified `value`. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/debugprint-0f.adoc[`debugprint`] | Same as the preceding overload for this test type. | xref:BloombergLP/bsltf/operator_not_eq-08.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` objects do not have the same value, and `false` otherwise. Two `AllocTestType` objects do not have the same value if their `data` attributes are not the same. | xref:BloombergLP/bsltf/operator_eq-03e7.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` objects have the same value, and `false` otherwise. Two `AllocTestType` objects have the same if their `data` attributes are the same. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#