Standard C++ Library Class Reference
static const bool
traps ;
This field is true if trapping is implemented for this type. The traps field is meaningful for
all specializations.
Example
//
// limits.cpp
//
#include <limits>
int main()
{
numeric_limits<float> float_info;
if (float_info.is_specialized && float_info.has_infinity)
{
// get value of infinity
float finfinity=float_info.infinity();
}
return 0;
}
Warning
The specializations for wide chars and bool will only be available if your compiler has
implemented them as real types and not simulated them with typedefs.
See Also
IEEE Standard for Binary Floating-Point Arithmetic, 345 East 47th Street, New York, NY
10017
Language Independent Arithmetic (LIA-1)