< cpp‎ | types‎ | numeric limits
Revision as of 15:18, 2 November 2012 by P12bot (Talk | contribs)

Type support
Basic types
Fundamental types
Fixed width integer types (C++11)
Numeric limits
C numeric limits interface
Runtime type information
Type traits
Primary type categories
Type properties
Supported operations
Relationships and property queries
Type modifications
Type transformations
Type trait constants

Template:ddcl list begin <tr class="t-dcl ">

<td >
static const bool has_quiet_NaN

<td class="t-dcl-nopad"> </td> <td > (until C++11) </td> </tr> <tr class="t-dcl ">

<td >
static constexpr bool has_quiet_NaN

<td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end

The value of std::numeric_limits<T>::has_quiet_NaN is true for all types T capable of representing the special value "Quiet Not-A-Number". This constant is meaningful for all floating-point types and is guaranteed to be true if std::numeric_limits<T>::is_iec559 == true.

Standard specializations

T value of std::numeric_limits<T>::has_quiet_NaN
/* non-specialized */ false
bool false
char false
signed char false
unsigned char false
wchar_t false
char16_t false
char32_t false
short false
unsigned short false
int false
unsigned int false
long false
unsigned long false
long long false
unsigned long long false
float usually true
double usually true
long double usually true

See also

returns a quiet NaN value of the given floating-point type
(public static member function) [edit]
identifies floating-point types that can represent the special value "positive infinity"
(public static member constant) [edit]
identifies floating-point types that can represent the special value "signaling not-a-number" (NaN)
(public static member constant) [edit]