Unconstrained attribute class that allocates with a standard allocator.
Declared in <bsltf_stdalloctesttype.h>
template<class ALLOC>
class StdAllocTestType;
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.
| Name | Description |
|---|---|
allocator_type | Allocator type used by this test type (needed by uses_allocator). |
| Name | Description |
|---|---|
StdAllocTestType [constructor] | Constructors |
~StdAllocTestType [destructor] | Destroy this object. |
operator= | Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object. |
allocator | Return the allocator used by this object to supply memory. |
data | Return the value of the data attribute of this object. |
setData | Set the data attribute of this object to the specified value. |
| Name | Description |
|---|---|
debugprint | Same as the preceding overload for this test type. |
operator!= | Return whether two objects do not have the same value. |
operator== | Return whether two objects have the same value. |