- tmp/tmp9c_s4aa6/{from.md → to.md} +176 -22
tmp/tmp9c_s4aa6/{from.md → to.md}
RENAMED
|
@@ -1,13 +1,166 @@
|
|
| 1 |
## Implementation properties <a id="support.limits">[[support.limits]]</a>
|
| 2 |
|
| 3 |
### General <a id="support.limits.general">[[support.limits.general]]</a>
|
| 4 |
|
| 5 |
-
The headers `<limits>`
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
### Header `<limits>` synopsis <a id="limits.syn">[[limits.syn]]</a>
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
namespace std {
|
|
@@ -16,15 +169,20 @@ namespace std {
|
|
| 16 |
enum float_denorm_style;
|
| 17 |
|
| 18 |
// [numeric.limits], class template numeric_limits
|
| 19 |
template<class T> class numeric_limits;
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
template<> class numeric_limits<bool>;
|
| 22 |
|
| 23 |
template<> class numeric_limits<char>;
|
| 24 |
template<> class numeric_limits<signed char>;
|
| 25 |
template<> class numeric_limits<unsigned char>;
|
|
|
|
| 26 |
template<> class numeric_limits<char16_t>;
|
| 27 |
template<> class numeric_limits<char32_t>;
|
| 28 |
template<> class numeric_limits<wchar_t>;
|
| 29 |
|
| 30 |
template<> class numeric_limits<short>;
|
|
@@ -135,14 +293,10 @@ namespace std {
|
|
| 135 |
|
| 136 |
static constexpr bool traps = false;
|
| 137 |
static constexpr bool tinyness_before = false;
|
| 138 |
static constexpr float_round_style round_style = round_toward_zero;
|
| 139 |
};
|
| 140 |
-
|
| 141 |
-
template<class T> class numeric_limits<const T>;
|
| 142 |
-
template<class T> class numeric_limits<volatile T>;
|
| 143 |
-
template<class T> class numeric_limits<const volatile T>;
|
| 144 |
}
|
| 145 |
```
|
| 146 |
|
| 147 |
For all members declared `static` `constexpr` in the `numeric_limits`
|
| 148 |
template, specializations shall define these values in such a way that
|
|
@@ -158,26 +312,26 @@ floating-point and integer, including `bool`. The member
|
|
| 158 |
|
| 159 |
The value of each member of a specialization of `numeric_limits` on a
|
| 160 |
cv-qualified type `cv T` shall be equal to the value of the
|
| 161 |
corresponding member of the specialization on the unqualified type `T`.
|
| 162 |
|
| 163 |
-
Non-arithmetic standard types, such as `complex<T>`
|
| 164 |
-
|
| 165 |
|
| 166 |
#### `numeric_limits` members <a id="numeric.limits.members">[[numeric.limits.members]]</a>
|
| 167 |
|
| 168 |
-
Each member function defined in this subclause is signal-safe
|
| 169 |
-
[[
|
| 170 |
|
| 171 |
``` cpp
|
| 172 |
static constexpr T min() noexcept;
|
| 173 |
```
|
| 174 |
|
| 175 |
Minimum finite value.[^3]
|
| 176 |
|
| 177 |
-
For floating types with subnormal numbers, returns the minimum
|
| 178 |
-
normalized value.
|
| 179 |
|
| 180 |
Meaningful for all specializations in which `is_bounded != false`, or
|
| 181 |
`is_bounded == false && is_signed == false`.
|
| 182 |
|
| 183 |
``` cpp
|
|
@@ -253,11 +407,11 @@ Meaningful for all specializations.
|
|
| 253 |
|
| 254 |
``` cpp
|
| 255 |
static constexpr int radix;
|
| 256 |
```
|
| 257 |
|
| 258 |
-
For floating types, specifies the base or radix of the exponent
|
| 259 |
representation (often 2).[^8]
|
| 260 |
|
| 261 |
For integer types, specifies the base of the representation.[^9]
|
| 262 |
|
| 263 |
Meaningful for all specializations.
|
|
@@ -414,11 +568,11 @@ Meaningful for all floating-point types.
|
|
| 414 |
static constexpr bool is_bounded;
|
| 415 |
```
|
| 416 |
|
| 417 |
`true` if the set of values representable by the type is finite.[^25]
|
| 418 |
|
| 419 |
-
[*Note 1*: All fundamental types
|
| 420 |
This member would be `false` for arbitrary precision
|
| 421 |
types. — *end note*]
|
| 422 |
|
| 423 |
Meaningful for all specializations.
|
| 424 |
|
|
@@ -431,22 +585,22 @@ operation involving `+`, `-`, or `*` on values of that type whose result
|
|
| 431 |
would fall outside the range \[`min()`, `max()`\], the value returned
|
| 432 |
differs from the true value by an integer multiple of
|
| 433 |
`max() - min() + 1`.
|
| 434 |
|
| 435 |
[*Example 1*: `is_modulo` is `false` for signed integer
|
| 436 |
-
types
|
| 437 |
-
|
| 438 |
wrap. — *end example*]
|
| 439 |
|
| 440 |
Meaningful for all specializations.
|
| 441 |
|
| 442 |
``` cpp
|
| 443 |
static constexpr bool traps;
|
| 444 |
```
|
| 445 |
|
| 446 |
-
`true` if, at
|
| 447 |
-
would cause an arithmetic operation using that value to trap.[^27]
|
| 448 |
|
| 449 |
Meaningful for all specializations.
|
| 450 |
|
| 451 |
``` cpp
|
| 452 |
static constexpr bool tinyness_before;
|
|
@@ -602,11 +756,11 @@ library header `<limits.h>`.
|
|
| 602 |
|
| 603 |
[*Note 1*: The types of the constants defined by macros in `<climits>`
|
| 604 |
are not required to match the types to which the macros
|
| 605 |
refer. — *end note*]
|
| 606 |
|
| 607 |
-
ISO C 5.2.4.2.1
|
| 608 |
|
| 609 |
### Header `<cfloat>` synopsis <a id="cfloat.syn">[[cfloat.syn]]</a>
|
| 610 |
|
| 611 |
``` cpp
|
| 612 |
#define FLT_ROUNDS see below
|
|
@@ -652,7 +806,7 @@ ISO C 5.2.4.2.1
|
|
| 652 |
```
|
| 653 |
|
| 654 |
The header `<cfloat>` defines all macros the same as the C standard
|
| 655 |
library header `<float.h>`.
|
| 656 |
|
| 657 |
-
ISO C 5.2.4.2.2
|
| 658 |
|
|
|
|
| 1 |
## Implementation properties <a id="support.limits">[[support.limits]]</a>
|
| 2 |
|
| 3 |
### General <a id="support.limits.general">[[support.limits.general]]</a>
|
| 4 |
|
| 5 |
+
The headers `<limits>`, `<climits>`, and `<cfloat>` supply
|
| 6 |
+
characteristics of implementation-dependent arithmetic types
|
| 7 |
+
[[basic.fundamental]].
|
| 8 |
+
|
| 9 |
+
### Header `<version>` synopsis <a id="version.syn">[[version.syn]]</a>
|
| 10 |
+
|
| 11 |
+
The header `<version>` supplies implementation-dependent information
|
| 12 |
+
about the C++ standard library (e.g., version number and release date).
|
| 13 |
+
|
| 14 |
+
Each of the macros defined in `<version>` is also defined after
|
| 15 |
+
inclusion of any member of the set of library headers indicated in the
|
| 16 |
+
corresponding comment in this synopsis.
|
| 17 |
+
|
| 18 |
+
[*Note 1*: Future versions of this International Standard might replace
|
| 19 |
+
the values of these macros with greater values. — *end note*]
|
| 20 |
+
|
| 21 |
+
``` cpp
|
| 22 |
+
#define __cpp_lib_addressof_constexpr 201603L // also in <memory>
|
| 23 |
+
#define __cpp_lib_allocator_traits_is_always_equal 201411L
|
| 24 |
+
// also in <memory>, <scoped_allocator>, <string>, <deque>, <forward_list>, <list>, <vector>,
|
| 25 |
+
// <map>, <set>, <unordered_map>, <unordered_set>
|
| 26 |
+
#define __cpp_lib_any 201606L // also in <any>
|
| 27 |
+
#define __cpp_lib_apply 201603L // also in <tuple>
|
| 28 |
+
#define __cpp_lib_array_constexpr 201811L // also in <iterator>, <array>
|
| 29 |
+
#define __cpp_lib_as_const 201510L // also in <utility>
|
| 30 |
+
#define __cpp_lib_assume_aligned 201811L // also in <memory>
|
| 31 |
+
#define __cpp_lib_atomic_flag_test 201907L // also in <atomic>
|
| 32 |
+
#define __cpp_lib_atomic_float 201711L // also in <atomic>
|
| 33 |
+
#define __cpp_lib_atomic_is_always_lock_free 201603L // also in <atomic>
|
| 34 |
+
#define __cpp_lib_atomic_lock_free_type_aliases 201907L // also in <atomic>
|
| 35 |
+
#define __cpp_lib_atomic_ref 201806L // also in <atomic>
|
| 36 |
+
#define __cpp_lib_atomic_shared_ptr 201711L // also in <memory>
|
| 37 |
+
#define __cpp_lib_atomic_value_initialization 201911L // also in <atomic>, <memory>
|
| 38 |
+
#define __cpp_lib_atomic_wait 201907L // also in <atomic>
|
| 39 |
+
#define __cpp_lib_barrier 201907L // also in <barrier>
|
| 40 |
+
#define __cpp_lib_bind_front 201907L // also in <functional>
|
| 41 |
+
#define __cpp_lib_bit_cast 201806L // also in <bit>
|
| 42 |
+
#define __cpp_lib_bitops 201907L // also in <bit>
|
| 43 |
+
#define __cpp_lib_bool_constant 201505L // also in <type_traits>
|
| 44 |
+
#define __cpp_lib_bounded_array_traits 201902L // also in <type_traits>
|
| 45 |
+
#define __cpp_lib_boyer_moore_searcher 201603L // also in <functional>
|
| 46 |
+
#define __cpp_lib_byte 201603L // also in <cstddef>
|
| 47 |
+
#define __cpp_lib_char8_t 201907L
|
| 48 |
+
// also in <atomic>, <filesystem>, <istream>, <limits>, <locale>, <ostream>, <string>, <string_view>
|
| 49 |
+
#define __cpp_lib_chrono 201907L // also in <chrono>
|
| 50 |
+
#define __cpp_lib_chrono_udls 201304L // also in <chrono>
|
| 51 |
+
#define __cpp_lib_clamp 201603L // also in <algorithm>
|
| 52 |
+
#define __cpp_lib_complex_udls 201309L // also in <complex>
|
| 53 |
+
#define __cpp_lib_concepts 202002L // also in <concepts>
|
| 54 |
+
#define __cpp_lib_constexpr_algorithms 201806L // also in <algorithm>
|
| 55 |
+
#define __cpp_lib_constexpr_complex 201711L // also in <complex>
|
| 56 |
+
#define __cpp_lib_constexpr_dynamic_alloc 201907L // also in <memory>
|
| 57 |
+
#define __cpp_lib_constexpr_functional 201907L // also in <functional>
|
| 58 |
+
#define __cpp_lib_constexpr_iterator 201811L // also in <iterator>
|
| 59 |
+
#define __cpp_lib_constexpr_memory 201811L // also in <memory>
|
| 60 |
+
#define __cpp_lib_constexpr_numeric 201911L // also in <numeric>
|
| 61 |
+
#define __cpp_lib_constexpr_string 201907L // also in <string>
|
| 62 |
+
#define __cpp_lib_constexpr_string_view 201811L // also in <string_view>
|
| 63 |
+
#define __cpp_lib_constexpr_tuple 201811L // also in <tuple>
|
| 64 |
+
#define __cpp_lib_constexpr_utility 201811L // also in <utility>
|
| 65 |
+
#define __cpp_lib_constexpr_vector 201907L // also in <vector>
|
| 66 |
+
#define __cpp_lib_coroutine 201902L // also in <coroutine>
|
| 67 |
+
#define __cpp_lib_destroying_delete 201806L // also in <new>
|
| 68 |
+
#define __cpp_lib_enable_shared_from_this 201603L // also in <memory>
|
| 69 |
+
#define __cpp_lib_endian 201907L // also in <bit>
|
| 70 |
+
#define __cpp_lib_erase_if 202002L
|
| 71 |
+
// also in <string>, <deque>, <forward_list>, <list>, <vector>, <map>, <set>, <unordered_map>,
|
| 72 |
+
// <unordered_set>
|
| 73 |
+
#define __cpp_lib_exchange_function 201304L // also in <utility>
|
| 74 |
+
#define __cpp_lib_execution 201902L // also in <execution>
|
| 75 |
+
#define __cpp_lib_filesystem 201703L // also in <filesystem>
|
| 76 |
+
#define __cpp_lib_format 201907L // also in <format>
|
| 77 |
+
#define __cpp_lib_gcd_lcm 201606L // also in <numeric>
|
| 78 |
+
#define __cpp_lib_generic_associative_lookup 201304L // also in <map>, <set>
|
| 79 |
+
#define __cpp_lib_generic_unordered_lookup 201811L
|
| 80 |
+
// also in <unordered_map>, <unordered_set>
|
| 81 |
+
#define __cpp_lib_hardware_interference_size 201703L // also in <new>
|
| 82 |
+
#define __cpp_lib_has_unique_object_representations 201606L // also in <type_traits>
|
| 83 |
+
#define __cpp_lib_hypot 201603L // also in <cmath>
|
| 84 |
+
#define __cpp_lib_incomplete_container_elements 201505L
|
| 85 |
+
// also in <forward_list>, <list>, <vector>
|
| 86 |
+
#define __cpp_lib_int_pow2 202002L // also in <bit>
|
| 87 |
+
#define __cpp_lib_integer_comparison_functions 202002L // also in <utility>
|
| 88 |
+
#define __cpp_lib_integer_sequence 201304L // also in <utility>
|
| 89 |
+
#define __cpp_lib_integral_constant_callable 201304L // also in <type_traits>
|
| 90 |
+
#define __cpp_lib_interpolate 201902L // also in <cmath>, <numeric>
|
| 91 |
+
#define __cpp_lib_invoke 201411L // also in <functional>
|
| 92 |
+
#define __cpp_lib_is_aggregate 201703L // also in <type_traits>
|
| 93 |
+
#define __cpp_lib_is_constant_evaluated 201811L // also in <type_traits>
|
| 94 |
+
#define __cpp_lib_is_final 201402L // also in <type_traits>
|
| 95 |
+
#define __cpp_lib_is_invocable 201703L // also in <type_traits>
|
| 96 |
+
#define __cpp_lib_is_layout_compatible 201907L // also in <type_traits>
|
| 97 |
+
#define __cpp_lib_is_nothrow_convertible 201806L // also in <type_traits>
|
| 98 |
+
#define __cpp_lib_is_null_pointer 201309L // also in <type_traits>
|
| 99 |
+
#define __cpp_lib_is_pointer_interconvertible 201907L // also in <type_traits>
|
| 100 |
+
#define __cpp_lib_is_swappable 201603L // also in <type_traits>
|
| 101 |
+
#define __cpp_lib_jthread 201911L // also in <stop_token>, <thread>
|
| 102 |
+
#define __cpp_lib_latch 201907L // also in <latch>
|
| 103 |
+
#define __cpp_lib_launder 201606L // also in <new>
|
| 104 |
+
#define __cpp_lib_list_remove_return_type 201806L // also in <forward_list>, <list>
|
| 105 |
+
#define __cpp_lib_logical_traits 201510L // also in <type_traits>
|
| 106 |
+
#define __cpp_lib_make_from_tuple 201606L // also in <tuple>
|
| 107 |
+
#define __cpp_lib_make_reverse_iterator 201402L // also in <iterator>
|
| 108 |
+
#define __cpp_lib_make_unique 201304L // also in <memory>
|
| 109 |
+
#define __cpp_lib_map_try_emplace 201411L // also in <map>
|
| 110 |
+
#define __cpp_lib_math_constants 201907L // also in <numbers>
|
| 111 |
+
#define __cpp_lib_math_special_functions 201603L // also in <cmath>
|
| 112 |
+
#define __cpp_lib_memory_resource 201603L // also in <memory_resource>
|
| 113 |
+
#define __cpp_lib_node_extract 201606L
|
| 114 |
+
// also in <map>, <set>, <unordered_map>, <unordered_set>
|
| 115 |
+
#define __cpp_lib_nonmember_container_access 201411L
|
| 116 |
+
// also in <array>, <deque>, <forward_list>, <iterator>, <list>, <map>, <regex>, <set>, <string>,
|
| 117 |
+
// <unordered_map>, <unordered_set>, <vector>
|
| 118 |
+
#define __cpp_lib_not_fn 201603L // also in <functional>
|
| 119 |
+
#define __cpp_lib_null_iterators 201304L // also in <iterator>
|
| 120 |
+
#define __cpp_lib_optional 201606L // also in <optional>
|
| 121 |
+
#define __cpp_lib_parallel_algorithm 201603L // also in <algorithm>, <numeric>
|
| 122 |
+
#define __cpp_lib_polymorphic_allocator 201902L // also in <memory>
|
| 123 |
+
#define __cpp_lib_quoted_string_io 201304L // also in <iomanip>
|
| 124 |
+
#define __cpp_lib_ranges 201911L
|
| 125 |
+
// also in <algorithm>, <functional>, <iterator>, <memory>, <ranges>
|
| 126 |
+
#define __cpp_lib_raw_memory_algorithms 201606L // also in <memory>
|
| 127 |
+
#define __cpp_lib_remove_cvref 201711L // also in <type_traits>
|
| 128 |
+
#define __cpp_lib_result_of_sfinae 201210L // also in <functional>, <type_traits>
|
| 129 |
+
#define __cpp_lib_robust_nonmodifying_seq_ops 201304L // also in <algorithm>
|
| 130 |
+
#define __cpp_lib_sample 201603L // also in <algorithm>
|
| 131 |
+
#define __cpp_lib_scoped_lock 201703L // also in <mutex>
|
| 132 |
+
#define __cpp_lib_semaphore 201907L // also in <semaphore>
|
| 133 |
+
#define __cpp_lib_shared_mutex 201505L // also in <shared_mutex>
|
| 134 |
+
#define __cpp_lib_shared_ptr_arrays 201707L // also in <memory>
|
| 135 |
+
#define __cpp_lib_shared_ptr_weak_type 201606L // also in <memory>
|
| 136 |
+
#define __cpp_lib_shared_timed_mutex 201402L // also in <shared_mutex>
|
| 137 |
+
#define __cpp_lib_shift 201806L // also in <algorithm>
|
| 138 |
+
#define __cpp_lib_smart_ptr_for_overwrite 202002L // also in <memory>
|
| 139 |
+
#define __cpp_lib_source_location 201907L // also in <source_location>
|
| 140 |
+
#define __cpp_lib_span 202002L // also in <span>
|
| 141 |
+
#define __cpp_lib_ssize 201902L // also in <iterator>
|
| 142 |
+
#define __cpp_lib_starts_ends_with 201711L // also in <string>, <string_view>
|
| 143 |
+
#define __cpp_lib_string_udls 201304L // also in <string>
|
| 144 |
+
#define __cpp_lib_string_view 201803L // also in <string>, <string_view>
|
| 145 |
+
#define __cpp_lib_syncbuf 201803L // also in <syncstream>
|
| 146 |
+
#define __cpp_lib_three_way_comparison 201907L // also in <compare>
|
| 147 |
+
#define __cpp_lib_to_address 201711L // also in <memory>
|
| 148 |
+
#define __cpp_lib_to_array 201907L // also in <array>
|
| 149 |
+
#define __cpp_lib_to_chars 201611L // also in <charconv>
|
| 150 |
+
#define __cpp_lib_transformation_trait_aliases 201304L // also in <type_traits>
|
| 151 |
+
#define __cpp_lib_transparent_operators 201510L // also in <memory>, <functional>
|
| 152 |
+
#define __cpp_lib_tuple_element_t 201402L // also in <tuple>
|
| 153 |
+
#define __cpp_lib_tuples_by_type 201304L // also in <utility>, <tuple>
|
| 154 |
+
#define __cpp_lib_type_identity 201806L // also in <type_traits>
|
| 155 |
+
#define __cpp_lib_type_trait_variable_templates 201510L // also in <type_traits>
|
| 156 |
+
#define __cpp_lib_uncaught_exceptions 201411L // also in <exception>
|
| 157 |
+
#define __cpp_lib_unordered_map_try_emplace 201411L // also in <unordered_map>
|
| 158 |
+
#define __cpp_lib_unwrap_ref 201811L // also in <type_traits>
|
| 159 |
+
#define __cpp_lib_variant 201606L // also in <variant>
|
| 160 |
+
#define __cpp_lib_void_t 201411L // also in <type_traits>
|
| 161 |
+
```
|
| 162 |
|
| 163 |
### Header `<limits>` synopsis <a id="limits.syn">[[limits.syn]]</a>
|
| 164 |
|
| 165 |
``` cpp
|
| 166 |
namespace std {
|
|
|
|
| 169 |
enum float_denorm_style;
|
| 170 |
|
| 171 |
// [numeric.limits], class template numeric_limits
|
| 172 |
template<class T> class numeric_limits;
|
| 173 |
|
| 174 |
+
template<class T> class numeric_limits<const T>;
|
| 175 |
+
template<class T> class numeric_limits<volatile T>;
|
| 176 |
+
template<class T> class numeric_limits<const volatile T>;
|
| 177 |
+
|
| 178 |
template<> class numeric_limits<bool>;
|
| 179 |
|
| 180 |
template<> class numeric_limits<char>;
|
| 181 |
template<> class numeric_limits<signed char>;
|
| 182 |
template<> class numeric_limits<unsigned char>;
|
| 183 |
+
template<> class numeric_limits<char8_t>;
|
| 184 |
template<> class numeric_limits<char16_t>;
|
| 185 |
template<> class numeric_limits<char32_t>;
|
| 186 |
template<> class numeric_limits<wchar_t>;
|
| 187 |
|
| 188 |
template<> class numeric_limits<short>;
|
|
|
|
| 293 |
|
| 294 |
static constexpr bool traps = false;
|
| 295 |
static constexpr bool tinyness_before = false;
|
| 296 |
static constexpr float_round_style round_style = round_toward_zero;
|
| 297 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
}
|
| 299 |
```
|
| 300 |
|
| 301 |
For all members declared `static` `constexpr` in the `numeric_limits`
|
| 302 |
template, specializations shall define these values in such a way that
|
|
|
|
| 312 |
|
| 313 |
The value of each member of a specialization of `numeric_limits` on a
|
| 314 |
cv-qualified type `cv T` shall be equal to the value of the
|
| 315 |
corresponding member of the specialization on the unqualified type `T`.
|
| 316 |
|
| 317 |
+
Non-arithmetic standard types, such as `complex<T>` [[complex]], shall
|
| 318 |
+
not have specializations.
|
| 319 |
|
| 320 |
#### `numeric_limits` members <a id="numeric.limits.members">[[numeric.limits.members]]</a>
|
| 321 |
|
| 322 |
+
Each member function defined in this subclause is signal-safe
|
| 323 |
+
[[support.signal]].
|
| 324 |
|
| 325 |
``` cpp
|
| 326 |
static constexpr T min() noexcept;
|
| 327 |
```
|
| 328 |
|
| 329 |
Minimum finite value.[^3]
|
| 330 |
|
| 331 |
+
For floating-point types with subnormal numbers, returns the minimum
|
| 332 |
+
positive normalized value.
|
| 333 |
|
| 334 |
Meaningful for all specializations in which `is_bounded != false`, or
|
| 335 |
`is_bounded == false && is_signed == false`.
|
| 336 |
|
| 337 |
``` cpp
|
|
|
|
| 407 |
|
| 408 |
``` cpp
|
| 409 |
static constexpr int radix;
|
| 410 |
```
|
| 411 |
|
| 412 |
+
For floating-point types, specifies the base or radix of the exponent
|
| 413 |
representation (often 2).[^8]
|
| 414 |
|
| 415 |
For integer types, specifies the base of the representation.[^9]
|
| 416 |
|
| 417 |
Meaningful for all specializations.
|
|
|
|
| 568 |
static constexpr bool is_bounded;
|
| 569 |
```
|
| 570 |
|
| 571 |
`true` if the set of values representable by the type is finite.[^25]
|
| 572 |
|
| 573 |
+
[*Note 1*: All fundamental types [[basic.fundamental]] are bounded.
|
| 574 |
This member would be `false` for arbitrary precision
|
| 575 |
types. — *end note*]
|
| 576 |
|
| 577 |
Meaningful for all specializations.
|
| 578 |
|
|
|
|
| 585 |
would fall outside the range \[`min()`, `max()`\], the value returned
|
| 586 |
differs from the true value by an integer multiple of
|
| 587 |
`max() - min() + 1`.
|
| 588 |
|
| 589 |
[*Example 1*: `is_modulo` is `false` for signed integer
|
| 590 |
+
types [[basic.fundamental]] unless an implementation, as an extension to
|
| 591 |
+
this document, defines signed integer overflow to
|
| 592 |
wrap. — *end example*]
|
| 593 |
|
| 594 |
Meaningful for all specializations.
|
| 595 |
|
| 596 |
``` cpp
|
| 597 |
static constexpr bool traps;
|
| 598 |
```
|
| 599 |
|
| 600 |
+
`true` if, at the start of the program, there exists a value of the type
|
| 601 |
+
that would cause an arithmetic operation using that value to trap.[^27]
|
| 602 |
|
| 603 |
Meaningful for all specializations.
|
| 604 |
|
| 605 |
``` cpp
|
| 606 |
static constexpr bool tinyness_before;
|
|
|
|
| 756 |
|
| 757 |
[*Note 1*: The types of the constants defined by macros in `<climits>`
|
| 758 |
are not required to match the types to which the macros
|
| 759 |
refer. — *end note*]
|
| 760 |
|
| 761 |
+
See also: ISO C 5.2.4.2.1
|
| 762 |
|
| 763 |
### Header `<cfloat>` synopsis <a id="cfloat.syn">[[cfloat.syn]]</a>
|
| 764 |
|
| 765 |
``` cpp
|
| 766 |
#define FLT_ROUNDS see below
|
|
|
|
| 806 |
```
|
| 807 |
|
| 808 |
The header `<cfloat>` defines all macros the same as the C standard
|
| 809 |
library header `<float.h>`.
|
| 810 |
|
| 811 |
+
See also: ISO C 5.2.4.2.2
|
| 812 |
|