Defines a set of limits for a type T.
More...
Defines a set of limits for a type T.
This structure provides a set of limits and special values for the type T that can be used for generating test data that covers edge cases and special values. The actual limits provided depend on the type T and its base type.
The provided limits include:
valmax: The maximum representable value of the base type.valmin: The minimum representable value of the base type.zero: The value representing zero.one: The value representing one.For floating-point types, additional limits include:
nan: Not-a-Number value.inf: Positive infinity.minf: Negative infinity.maxflint: The largest integer value that can be exactly represented in the type.mindenormal: The smallest positive subnormal value.smallestposval: The smallest positive normal value.mzero: Negative zero.mone: The value representing negative one.This class can be specialized for user-defined types to provide custom limits.
| T | Type for which to provide limits for. |
Related Symbols | |
(Note that these are not member symbols.) | |
| template<typename T > | |
| auto | limits (tts::type< T >) |
Provides a set of limits for the type T. | |