Quick Links:

bal | bbl | bdl | bsl

Namespaces

Component bsltf_nonequalcomparabletesttype
[Package bsltf]

Provide an attribute class that is not equal comparable. More...

Namespaces

namespace  bsltf

Detailed Description

Outline
Purpose:
Provide an attribute class that is not equal comparable.
Classes:
bsltf::NonEqualComparableTestType non-equal-comparable class
See also:
Component 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
  • data: representation of the class value
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