BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsltf_nondefaultconstructibletesttype

Detailed Description

Outline

Purpose

Provide an attribute class that is not default constructible.

Classes

See also
bsltf_templatetestfacility

Description

This component provides a single, unconstrained (value-semantic) attribute class, NonDefaultConstructibleTestType, that is does not provide a default constructor. This is particularly valuable when testing container operations that works with non-default-constructible types.

Attributes

Name Type Default
------------------ ----------- -------
data int N/A

Usage

This section illustrates intended use of this component.

Example 1: Demonstrating The Type Cannot Be Default Constructed

We show that create a NonDefaultConstructibleTestType by using the default constructor will not compile:

NonDefaultConstructibleTestType X; // This will not compile