Allocating unconstrained value‐semantic test type.

Synopsis

Declared in <bsltf_alloctesttype.h>

class AllocTestType;

Description

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.

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.

operator!=

Return whether two objects do not have the same value.

operator==

Return whether two objects have the same value.

Created with MrDocs