This documentation is archived and is not being maintained.

numeric_limits Class

The template class describes arithmetic properties of built-in numerical types.

template<class Type> class numeric_limits

Parameter

Type
The fundamental element data type whose properties are being tested or queried or set.

Remarks

The header defines explicit specializations for the types wchar_t, bool, char, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, float, double, and long double. For these explicit specializations, the member numeric_limits::is_specialized is true, and all relevant members have meaningful values. The program can supply additional explicit specializations. Most member functions of the class describe or test possible implementations of float.

For an arbitrary specialization, no members have meaningful values. A member object that does not have a meaningful value stores zero (or false) and a member function that does not return a meaningful value returns Type(0).

Requirements

Header: <limits>

See Also

numeric_limits Members | <limits> Members | Members of the numeric_limits Class Sample | Thread Safety in the Standard C++ Library

Show: