|
BDE 4.14.0 Production release
|
Provide a class for testing that allocates with bslma::Allocator.
This component provides a single, unconstrained (value-semantic) attribute class, NonOptionalAllocTestType, that uses a bslma::Allocator to allocate memory and defines the type trait bslma::UsesBslmaAllocator. Furthermore, this class is not bitwise-moveable, and will assert on destruction if it has been moved. This class does not meet the default-insertable requirement on template parameter type for containers and is primarily provided to facilitate testing of extended quality of implementation of BDE containers.
data: representation of the object's valueThis section illustrates intended use of this component.
Suppose we wanted to print the supported traits of this test type.
First, we create a function template printTypeTraits with a parameterized TYPE:
Now, we invoke the printTypeTraits function template using NonOptionalAllocTestType as the parameterized TYPE:
Finally, we observe the console output: