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

Detailed Description

Outline

Purpose

Provide an attribute class that is not equal comparable.

Classes

See also
bsltf_templatetestfacility

Description

This component provides a single, unconstrained (value-semantic) attribute class, NonEqualComparableTestType, that does not provide equality-comparison operators. This is particularly valuable when test containers that should work with non-equal-comparable types.

Attributes

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

Usage

This section illustrates intended use of this component.

Example 1: Demonstrating the Type Cannot be Equality Compared

Suppose we wanted to show NonEqualComparableTestType can't be equal compared.

First, we create two NonEqualComparableTestType objects, X and Y:

NonEqualComparableTestType X(1);
NonEqualComparableTestType Y(2);

Now, we show that equal comparing X and Y will not compile:

assert(X != Y); // This will not compile