Provide a class that overloads the non-typical operators.
More...
Namespaces |
namespace | bsltf |
Detailed Description
- Outline
-
-
- Purpose:
- Provide a class that overloads the non-typical operators.
-
- Classes:
-
-
- Description:
- This component provides a single, unconstrained (value-semantic) attribute class,
NonTypicalOverloadsTestType
, that defines overloads to some non-typically-overloaded operators ('operator new', operator delete
, and operator&
) to ensure that they do not get invoked.
-
- 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 Calling Operator New/Delete Induce Assertions:
- Suppose that we wanted to show that calling
operator new
and operator delete on 'NonTypicalOverloadsTestType
causes an assertion.
- First, we verify that calling
operator new
will result in an assertion: Finally, we verify that calling operator delete
will result in an assertion: