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

Detailed Description

Outline

Purpose

Provide an attribute class that is not copy constructible.

Classes

See also
bsltf_templatetestfacility

Description

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

Attributes

Name Type Default
------------------ ----------- -------
data int 0

Usage

This section illustrates intended use of this component.

Example 1: Demonstrating The Type Cannot Be Copy Constructed

Suppose we wanted to show NonCopyConstructibleTestType can't be copy constructed:

First, we create a NonCopyConstructibleTestType object, X:

NonCopyConstructibleTestType X;

Now, we show that copy constructing another object from X will not compile:

NonCopyConstructibleTestType Y(X); // This will not compile