Quick Links:

bal | bbl | bdl | bsl

Namespaces

Component bsltf_noncopyconstructibletesttype
[Package bsltf]

Provide an attribute class that is not copy constructible. More...

Namespaces

namespace  bsltf

Detailed Description

Outline
Purpose:
Provide an attribute class that is not copy constructible.
Classes:
bsltf::NonCopyConstructibleTestType non-copy-constructible test type
See also:
Component 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
  • data: representation of the class value
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