Itasca C++ Interface
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
limits< T > Class Template Reference

debug checked shorthand for std::numeric_limits<T>:: More...

#include <limit.h>

Inheritance diagram for limits< T >:

Static Public Member Functions

static T real_min ()
 

Detailed Description

template<class T>
class limits< T >

debug checked shorthand for std::numeric_limits<T>::

This simply allows the use of limits<T> as a convenient shorthand to the verbose std::numeric_limits<T>.
It also performs overflow checking in debug mode only.

Member Function Documentation

◆ real_min()

template<class T >
static T limits< T >::real_min ( )
inlinestatic

Returns the "real" minimum value of the type.
Intended to evade the weird behavior for std::numeric_limits that min() works (as one would expect) for integral types, but not for floating point types.

Returns
min() for integral types, and -max() for floating point types.

The documentation for this class was generated from the following file: