[numeric.limits.general]

# 17 Language support library [[support]](./#support)

## 17.3 Implementation properties [[support.limits]](support.limits#numeric.limits.general)

### 17.3.5 Class template numeric_limits [[numeric.limits]](numeric.limits#general)

#### 17.3.5.1 General [numeric.limits.general]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L998)

Thenumeric_limits class template provides a C++ program with information about various properties of
the implementation's representation of the
arithmetic types[.](#1.sentence-1)

[ð](#lib:numeric_limits_)

namespace std {template<class T> class numeric_limits {public:static constexpr bool is_specialized = false; static constexpr T min() noexcept { return T(); }static constexpr T max() noexcept { return T(); }static constexpr T lowest() noexcept { return T(); }static constexpr int digits = 0; static constexpr int digits10 = 0; static constexpr int max_digits10 = 0; static constexpr bool is_signed = false; static constexpr bool is_integer = false; static constexpr bool is_exact = false; static constexpr int radix = 0; static constexpr T epsilon() noexcept { return T(); }static constexpr T round_error() noexcept { return T(); }static constexpr int min_exponent = 0; static constexpr int min_exponent10 = 0; static constexpr int max_exponent = 0; static constexpr int max_exponent10 = 0; static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; static constexpr T infinity() noexcept { return T(); }static constexpr T quiet_NaN() noexcept { return T(); }static constexpr T signaling_NaN() noexcept { return T(); }static constexpr T denorm_min() noexcept { return T(); }static constexpr bool is_iec559 = false; static constexpr bool is_bounded = false; static constexpr bool is_modulo = false; static constexpr bool traps = false; static constexpr bool tinyness_before = false; static constexpr float_round_style round_style = round_toward_zero; };}

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L1050)

For all members declaredstatic constexpr in thenumeric_limits template, specializations shall define these values in such a way
that they are usable as
constant expressions[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L1059)

For thenumeric_limits primary template, all data members are value-initialized and all
member functions return a value-initialized object[.](#3.sentence-1)

[*Note [1](#note-1)*:

This means all members have zero or false values
unless numeric_limits is specialized for a type[.](#3.sentence-2)

â *end note*]

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L1069)

Specializations shall be provided for each
arithmetic type,
both floating-point and integer, includingbool[.](#4.sentence-1)

The memberis_specialized shall betrue for all such specializations ofnumeric_limits[.](#4.sentence-2)

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L1081)

The value of each member of a specialization ofnumeric_limits on a cv-qualified typecv T shall be equal to the value of the corresponding member of
the specialization on the unqualified type T[.](#5.sentence-1)

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L1087)

Non-arithmetic standard types, such as[complex<T>](complex "29.4.3 Class template complex [complex]"), shall not have specializations[.](#6.sentence-1)
