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>

class AllocTestType;

Type Aliases

Name

Description

allocator_type

Allocator type used by this test type.

Member Functions

Name

Description

AllocTestType [constructor]

Constructors

~AllocTestType [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 get_allocator().mechanism().

data

Return the value of the data attribute of this object.

get_allocator

Return the allocator used by this object to supply memory.

setData

Set the data attribute of this object to the specified value.

Non-Member Functions

Name

Description

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.

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.

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.

Created with MrDocs