Base class for the helper class to deduce properties of numeric types defined in this API. More...
Static Public Member Functions | |
static T() | min () throw () |
Returns the minimum finite value for T ; for floating point types, returns the minimum positive value. More... |
|
static T() | max () throw () |
Returns the maximum finite value for T . More... |
|
static T | negative_max () throw () |
Returns the smallest finite negative value for T . More... |
|
static T | infinity () throw () |
Returns an infinity value for T , if one exists, and T() otherwise. More... |
|
static T | quiet_NaN () throw () |
Returns a quiet NaN value for T , if one exists, and T() otherwise. More... |
|
static T | signaling_NaN () throw () |
Returns a signaling NaN value for T , if one exists, and T() otherwise. More... |
|
Static Public Attributes | |
static const bool | is_specialized = false |
Constant that is true if and only if this traits is specialized for T . More... |
|
static const bool | has_infinity = false |
Constant that is true if and only if T has an infinity representation. More... |
|
static const bool | has_quiet_NaN = false |
Constant that is true if and only if T has a quiet NaN (not-a-number) representation. More... |
|
static const bool | has_signaling_NaN = false |
Constant that is true if and only if T has a signaling NaN (not-a-number) representation. More... |
|
Base class for the helper class to deduce properties of numeric types defined in this API.
This class provides the common default implementations of all member of numeric_traits
, for its default template as well as all specialization. Thus, specializations just have to redefine what changes.
The default uses default constructed values. It therefore requires that a value of T
can be default constructed.
|
inlinestatic |
Returns an infinity value for T
, if one exists, and T()
otherwise.
|
inlinestatic |
Returns the maximum finite value for T
.
The value is equivalent to standard C constants CHAR_MAX
, SHRT_MAX
, FLT_MAX
, DBL_MAX
, etc.
T
.
|
inlinestatic |
Returns the minimum finite value for T
; for floating point types, returns the minimum positive value.
The value is equivalent to standard C constants CHAR_MIN
, SHRT_MIN
, FLT_MIN
, DBL_MIN
, etc.
T
.
|
inlinestatic |
Returns the smallest finite negative value for T
.
For signed integer types this value is typically (-max()-1). For unsigned integer types it is 0. For floating point types it is typically
(-max()).
T
.
|
inlinestatic |
Returns a quiet NaN value for T
, if one exists, and T()
otherwise.
|
inlinestatic |
Returns a signaling NaN value for T
, if one exists, and T()
otherwise.
|
static |
Constant that is true
if and only if T
has an infinity representation.
You can get the infinity representation through the infinity()
method.
|
static |
Constant that is true
if and only if T
has a quiet NaN (not-a-number) representation.
You can get the quiet NaN representation through the quiet_NaN()
method.
|
static |
Constant that is true
if and only if T
has a signaling NaN (not-a-number) representation.
You can get the signaling NaN representation through the signaling_NaN()
method.
|
static |
Constant that is true
if and only if this traits is specialized for T
.