[#BloombergLP-bsltf-AllocTestType] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsltf.adoc[bsltf]::AllocTestType :relfileprefix: ../../ :mrdocs: This unconstrained (value‐semantic) attribute class that uses a `bsl::allocator<>` to supply memory and defines the type trait `bslma::UsesBslmaAllocator`. This class is primarily provided to facilitate testing of templates by defining a simple type representative of user‐defined types having an allocator. See the Attributes section under DESCRIPTION in the component‐level documentation for information on the class attributes. == Synopsis Declared in `<bsltf_alloctesttype.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class AllocTestType; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/AllocTestType/allocator_type.adoc[`allocator_type`] | Allocator type used by this test type. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsltf/AllocTestType/2constructor-0f.adoc[`AllocTestType`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bsltf/AllocTestType/2destructor.adoc[`~AllocTestType`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/bsltf/AllocTestType/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/AllocTestType/allocator.adoc[`allocator`] | Return `get_allocator().mechanism()`. | xref:BloombergLP/bsltf/AllocTestType/data.adoc[`data`] | Return the value of the `data` attribute of this object. | xref:BloombergLP/bsltf/AllocTestType/get_allocator.adoc[`get_allocator`] | Return the allocator used by this object to supply memory. | xref:BloombergLP/bsltf/AllocTestType/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-0b9.adoc[`debugprint`] | Print the value of the specified `obj` to the console. Note that this free function is provided to allow `bsls_bsltestutil` to support these types intended for testing. See the component‐level documentation for `bsls_bsltestutil` for more details. | xref:BloombergLP/bsltf/operator_not_eq-05bf.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-0b9e.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]#