annotate libcxx/include/limits @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 79ff65ed7e25
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // -*- C++ -*-
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
2 //===----------------------------------------------------------------------===//
150
anatofuz
parents:
diff changeset
3 //
anatofuz
parents:
diff changeset
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
anatofuz
parents:
diff changeset
5 // See https://llvm.org/LICENSE.txt for license information.
anatofuz
parents:
diff changeset
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
anatofuz
parents:
diff changeset
7 //
anatofuz
parents:
diff changeset
8 //===----------------------------------------------------------------------===//
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 #ifndef _LIBCPP_LIMITS
anatofuz
parents:
diff changeset
11 #define _LIBCPP_LIMITS
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 /*
anatofuz
parents:
diff changeset
14 limits synopsis
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 namespace std
anatofuz
parents:
diff changeset
17 {
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 template<class T>
anatofuz
parents:
diff changeset
20 class numeric_limits
anatofuz
parents:
diff changeset
21 {
anatofuz
parents:
diff changeset
22 public:
anatofuz
parents:
diff changeset
23 static constexpr bool is_specialized = false;
anatofuz
parents:
diff changeset
24 static constexpr T min() noexcept;
anatofuz
parents:
diff changeset
25 static constexpr T max() noexcept;
anatofuz
parents:
diff changeset
26 static constexpr T lowest() noexcept;
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 static constexpr int digits = 0;
anatofuz
parents:
diff changeset
29 static constexpr int digits10 = 0;
anatofuz
parents:
diff changeset
30 static constexpr int max_digits10 = 0;
anatofuz
parents:
diff changeset
31 static constexpr bool is_signed = false;
anatofuz
parents:
diff changeset
32 static constexpr bool is_integer = false;
anatofuz
parents:
diff changeset
33 static constexpr bool is_exact = false;
anatofuz
parents:
diff changeset
34 static constexpr int radix = 0;
anatofuz
parents:
diff changeset
35 static constexpr T epsilon() noexcept;
anatofuz
parents:
diff changeset
36 static constexpr T round_error() noexcept;
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 static constexpr int min_exponent = 0;
anatofuz
parents:
diff changeset
39 static constexpr int min_exponent10 = 0;
anatofuz
parents:
diff changeset
40 static constexpr int max_exponent = 0;
anatofuz
parents:
diff changeset
41 static constexpr int max_exponent10 = 0;
anatofuz
parents:
diff changeset
42
anatofuz
parents:
diff changeset
43 static constexpr bool has_infinity = false;
anatofuz
parents:
diff changeset
44 static constexpr bool has_quiet_NaN = false;
anatofuz
parents:
diff changeset
45 static constexpr bool has_signaling_NaN = false;
anatofuz
parents:
diff changeset
46 static constexpr float_denorm_style has_denorm = denorm_absent;
anatofuz
parents:
diff changeset
47 static constexpr bool has_denorm_loss = false;
anatofuz
parents:
diff changeset
48 static constexpr T infinity() noexcept;
anatofuz
parents:
diff changeset
49 static constexpr T quiet_NaN() noexcept;
anatofuz
parents:
diff changeset
50 static constexpr T signaling_NaN() noexcept;
anatofuz
parents:
diff changeset
51 static constexpr T denorm_min() noexcept;
anatofuz
parents:
diff changeset
52
anatofuz
parents:
diff changeset
53 static constexpr bool is_iec559 = false;
anatofuz
parents:
diff changeset
54 static constexpr bool is_bounded = false;
anatofuz
parents:
diff changeset
55 static constexpr bool is_modulo = false;
anatofuz
parents:
diff changeset
56
anatofuz
parents:
diff changeset
57 static constexpr bool traps = false;
anatofuz
parents:
diff changeset
58 static constexpr bool tinyness_before = false;
anatofuz
parents:
diff changeset
59 static constexpr float_round_style round_style = round_toward_zero;
anatofuz
parents:
diff changeset
60 };
anatofuz
parents:
diff changeset
61
anatofuz
parents:
diff changeset
62 enum float_round_style
anatofuz
parents:
diff changeset
63 {
anatofuz
parents:
diff changeset
64 round_indeterminate = -1,
anatofuz
parents:
diff changeset
65 round_toward_zero = 0,
anatofuz
parents:
diff changeset
66 round_to_nearest = 1,
anatofuz
parents:
diff changeset
67 round_toward_infinity = 2,
anatofuz
parents:
diff changeset
68 round_toward_neg_infinity = 3
anatofuz
parents:
diff changeset
69 };
anatofuz
parents:
diff changeset
70
anatofuz
parents:
diff changeset
71 enum float_denorm_style
anatofuz
parents:
diff changeset
72 {
anatofuz
parents:
diff changeset
73 denorm_indeterminate = -1,
anatofuz
parents:
diff changeset
74 denorm_absent = 0,
anatofuz
parents:
diff changeset
75 denorm_present = 1
anatofuz
parents:
diff changeset
76 };
anatofuz
parents:
diff changeset
77
anatofuz
parents:
diff changeset
78 template<> class numeric_limits<cv bool>;
anatofuz
parents:
diff changeset
79
anatofuz
parents:
diff changeset
80 template<> class numeric_limits<cv char>;
anatofuz
parents:
diff changeset
81 template<> class numeric_limits<cv signed char>;
anatofuz
parents:
diff changeset
82 template<> class numeric_limits<cv unsigned char>;
anatofuz
parents:
diff changeset
83 template<> class numeric_limits<cv wchar_t>;
anatofuz
parents:
diff changeset
84 template<> class numeric_limits<cv char8_t>; // C++20
anatofuz
parents:
diff changeset
85 template<> class numeric_limits<cv char16_t>;
anatofuz
parents:
diff changeset
86 template<> class numeric_limits<cv char32_t>;
anatofuz
parents:
diff changeset
87
anatofuz
parents:
diff changeset
88 template<> class numeric_limits<cv short>;
anatofuz
parents:
diff changeset
89 template<> class numeric_limits<cv int>;
anatofuz
parents:
diff changeset
90 template<> class numeric_limits<cv long>;
anatofuz
parents:
diff changeset
91 template<> class numeric_limits<cv long long>;
anatofuz
parents:
diff changeset
92 template<> class numeric_limits<cv unsigned short>;
anatofuz
parents:
diff changeset
93 template<> class numeric_limits<cv unsigned int>;
anatofuz
parents:
diff changeset
94 template<> class numeric_limits<cv unsigned long>;
anatofuz
parents:
diff changeset
95 template<> class numeric_limits<cv unsigned long long>;
anatofuz
parents:
diff changeset
96
anatofuz
parents:
diff changeset
97 template<> class numeric_limits<cv float>;
anatofuz
parents:
diff changeset
98 template<> class numeric_limits<cv double>;
anatofuz
parents:
diff changeset
99 template<> class numeric_limits<cv long double>;
anatofuz
parents:
diff changeset
100
anatofuz
parents:
diff changeset
101 } // std
anatofuz
parents:
diff changeset
102
anatofuz
parents:
diff changeset
103 */
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
104
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
105 #include <__assert> // all public C++ headers provide the assertion handler
150
anatofuz
parents:
diff changeset
106 #include <__config>
anatofuz
parents:
diff changeset
107 #include <type_traits>
anatofuz
parents:
diff changeset
108
anatofuz
parents:
diff changeset
109 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
110 # pragma GCC system_header
150
anatofuz
parents:
diff changeset
111 #endif
anatofuz
parents:
diff changeset
112
anatofuz
parents:
diff changeset
113 _LIBCPP_PUSH_MACROS
anatofuz
parents:
diff changeset
114 #include <__undef_macros>
anatofuz
parents:
diff changeset
115 #include <version>
anatofuz
parents:
diff changeset
116
anatofuz
parents:
diff changeset
117
anatofuz
parents:
diff changeset
118 _LIBCPP_BEGIN_NAMESPACE_STD
anatofuz
parents:
diff changeset
119
anatofuz
parents:
diff changeset
120 enum float_round_style
anatofuz
parents:
diff changeset
121 {
anatofuz
parents:
diff changeset
122 round_indeterminate = -1,
anatofuz
parents:
diff changeset
123 round_toward_zero = 0,
anatofuz
parents:
diff changeset
124 round_to_nearest = 1,
anatofuz
parents:
diff changeset
125 round_toward_infinity = 2,
anatofuz
parents:
diff changeset
126 round_toward_neg_infinity = 3
anatofuz
parents:
diff changeset
127 };
anatofuz
parents:
diff changeset
128
anatofuz
parents:
diff changeset
129 enum float_denorm_style
anatofuz
parents:
diff changeset
130 {
anatofuz
parents:
diff changeset
131 denorm_indeterminate = -1,
anatofuz
parents:
diff changeset
132 denorm_absent = 0,
anatofuz
parents:
diff changeset
133 denorm_present = 1
anatofuz
parents:
diff changeset
134 };
anatofuz
parents:
diff changeset
135
anatofuz
parents:
diff changeset
136 template <class _Tp, bool = is_arithmetic<_Tp>::value>
anatofuz
parents:
diff changeset
137 class __libcpp_numeric_limits
anatofuz
parents:
diff changeset
138 {
anatofuz
parents:
diff changeset
139 protected:
anatofuz
parents:
diff changeset
140 typedef _Tp type;
anatofuz
parents:
diff changeset
141
anatofuz
parents:
diff changeset
142 static _LIBCPP_CONSTEXPR const bool is_specialized = false;
anatofuz
parents:
diff changeset
143 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return type();}
anatofuz
parents:
diff changeset
144 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return type();}
anatofuz
parents:
diff changeset
145 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return type();}
anatofuz
parents:
diff changeset
146
anatofuz
parents:
diff changeset
147 static _LIBCPP_CONSTEXPR const int digits = 0;
anatofuz
parents:
diff changeset
148 static _LIBCPP_CONSTEXPR const int digits10 = 0;
anatofuz
parents:
diff changeset
149 static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
anatofuz
parents:
diff changeset
150 static _LIBCPP_CONSTEXPR const bool is_signed = false;
anatofuz
parents:
diff changeset
151 static _LIBCPP_CONSTEXPR const bool is_integer = false;
anatofuz
parents:
diff changeset
152 static _LIBCPP_CONSTEXPR const bool is_exact = false;
anatofuz
parents:
diff changeset
153 static _LIBCPP_CONSTEXPR const int radix = 0;
anatofuz
parents:
diff changeset
154 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type();}
anatofuz
parents:
diff changeset
155 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type();}
anatofuz
parents:
diff changeset
156
anatofuz
parents:
diff changeset
157 static _LIBCPP_CONSTEXPR const int min_exponent = 0;
anatofuz
parents:
diff changeset
158 static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
anatofuz
parents:
diff changeset
159 static _LIBCPP_CONSTEXPR const int max_exponent = 0;
anatofuz
parents:
diff changeset
160 static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
anatofuz
parents:
diff changeset
161
anatofuz
parents:
diff changeset
162 static _LIBCPP_CONSTEXPR const bool has_infinity = false;
anatofuz
parents:
diff changeset
163 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
anatofuz
parents:
diff changeset
164 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
anatofuz
parents:
diff changeset
165 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
anatofuz
parents:
diff changeset
166 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
anatofuz
parents:
diff changeset
167 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type();}
anatofuz
parents:
diff changeset
168 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type();}
anatofuz
parents:
diff changeset
169 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type();}
anatofuz
parents:
diff changeset
170 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type();}
anatofuz
parents:
diff changeset
171
anatofuz
parents:
diff changeset
172 static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
anatofuz
parents:
diff changeset
173 static _LIBCPP_CONSTEXPR const bool is_bounded = false;
anatofuz
parents:
diff changeset
174 static _LIBCPP_CONSTEXPR const bool is_modulo = false;
anatofuz
parents:
diff changeset
175
anatofuz
parents:
diff changeset
176 static _LIBCPP_CONSTEXPR const bool traps = false;
anatofuz
parents:
diff changeset
177 static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
anatofuz
parents:
diff changeset
178 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
anatofuz
parents:
diff changeset
179 };
anatofuz
parents:
diff changeset
180
anatofuz
parents:
diff changeset
181 template <class _Tp, int __digits, bool _IsSigned>
anatofuz
parents:
diff changeset
182 struct __libcpp_compute_min
anatofuz
parents:
diff changeset
183 {
anatofuz
parents:
diff changeset
184 static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << __digits);
anatofuz
parents:
diff changeset
185 };
anatofuz
parents:
diff changeset
186
anatofuz
parents:
diff changeset
187 template <class _Tp, int __digits>
anatofuz
parents:
diff changeset
188 struct __libcpp_compute_min<_Tp, __digits, false>
anatofuz
parents:
diff changeset
189 {
anatofuz
parents:
diff changeset
190 static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0);
anatofuz
parents:
diff changeset
191 };
anatofuz
parents:
diff changeset
192
anatofuz
parents:
diff changeset
193 template <class _Tp>
anatofuz
parents:
diff changeset
194 class __libcpp_numeric_limits<_Tp, true>
anatofuz
parents:
diff changeset
195 {
anatofuz
parents:
diff changeset
196 protected:
anatofuz
parents:
diff changeset
197 typedef _Tp type;
anatofuz
parents:
diff changeset
198
anatofuz
parents:
diff changeset
199 static _LIBCPP_CONSTEXPR const bool is_specialized = true;
anatofuz
parents:
diff changeset
200
anatofuz
parents:
diff changeset
201 static _LIBCPP_CONSTEXPR const bool is_signed = type(-1) < type(0);
anatofuz
parents:
diff changeset
202 static _LIBCPP_CONSTEXPR const int digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed);
anatofuz
parents:
diff changeset
203 static _LIBCPP_CONSTEXPR const int digits10 = digits * 3 / 10;
anatofuz
parents:
diff changeset
204 static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
anatofuz
parents:
diff changeset
205 static _LIBCPP_CONSTEXPR const type __min = __libcpp_compute_min<type, digits, is_signed>::value;
anatofuz
parents:
diff changeset
206 static _LIBCPP_CONSTEXPR const type __max = is_signed ? type(type(~0) ^ __min) : type(~0);
anatofuz
parents:
diff changeset
207 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;}
anatofuz
parents:
diff changeset
208 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;}
anatofuz
parents:
diff changeset
209 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();}
anatofuz
parents:
diff changeset
210
anatofuz
parents:
diff changeset
211 static _LIBCPP_CONSTEXPR const bool is_integer = true;
anatofuz
parents:
diff changeset
212 static _LIBCPP_CONSTEXPR const bool is_exact = true;
anatofuz
parents:
diff changeset
213 static _LIBCPP_CONSTEXPR const int radix = 2;
anatofuz
parents:
diff changeset
214 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
215 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
216
anatofuz
parents:
diff changeset
217 static _LIBCPP_CONSTEXPR const int min_exponent = 0;
anatofuz
parents:
diff changeset
218 static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
anatofuz
parents:
diff changeset
219 static _LIBCPP_CONSTEXPR const int max_exponent = 0;
anatofuz
parents:
diff changeset
220 static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
anatofuz
parents:
diff changeset
221
anatofuz
parents:
diff changeset
222 static _LIBCPP_CONSTEXPR const bool has_infinity = false;
anatofuz
parents:
diff changeset
223 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
anatofuz
parents:
diff changeset
224 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
anatofuz
parents:
diff changeset
225 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
anatofuz
parents:
diff changeset
226 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
anatofuz
parents:
diff changeset
227 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
228 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
229 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
230 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
231
anatofuz
parents:
diff changeset
232 static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
anatofuz
parents:
diff changeset
233 static _LIBCPP_CONSTEXPR const bool is_bounded = true;
anatofuz
parents:
diff changeset
234 static _LIBCPP_CONSTEXPR const bool is_modulo = !_VSTD::is_signed<_Tp>::value;
anatofuz
parents:
diff changeset
235
anatofuz
parents:
diff changeset
236 #if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \
anatofuz
parents:
diff changeset
237 defined(__wasm__)
anatofuz
parents:
diff changeset
238 static _LIBCPP_CONSTEXPR const bool traps = true;
anatofuz
parents:
diff changeset
239 #else
anatofuz
parents:
diff changeset
240 static _LIBCPP_CONSTEXPR const bool traps = false;
anatofuz
parents:
diff changeset
241 #endif
anatofuz
parents:
diff changeset
242 static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
anatofuz
parents:
diff changeset
243 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
anatofuz
parents:
diff changeset
244 };
anatofuz
parents:
diff changeset
245
anatofuz
parents:
diff changeset
246 template <>
anatofuz
parents:
diff changeset
247 class __libcpp_numeric_limits<bool, true>
anatofuz
parents:
diff changeset
248 {
anatofuz
parents:
diff changeset
249 protected:
anatofuz
parents:
diff changeset
250 typedef bool type;
anatofuz
parents:
diff changeset
251
anatofuz
parents:
diff changeset
252 static _LIBCPP_CONSTEXPR const bool is_specialized = true;
anatofuz
parents:
diff changeset
253
anatofuz
parents:
diff changeset
254 static _LIBCPP_CONSTEXPR const bool is_signed = false;
anatofuz
parents:
diff changeset
255 static _LIBCPP_CONSTEXPR const int digits = 1;
anatofuz
parents:
diff changeset
256 static _LIBCPP_CONSTEXPR const int digits10 = 0;
anatofuz
parents:
diff changeset
257 static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
anatofuz
parents:
diff changeset
258 static _LIBCPP_CONSTEXPR const type __min = false;
anatofuz
parents:
diff changeset
259 static _LIBCPP_CONSTEXPR const type __max = true;
anatofuz
parents:
diff changeset
260 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;}
anatofuz
parents:
diff changeset
261 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;}
anatofuz
parents:
diff changeset
262 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();}
anatofuz
parents:
diff changeset
263
anatofuz
parents:
diff changeset
264 static _LIBCPP_CONSTEXPR const bool is_integer = true;
anatofuz
parents:
diff changeset
265 static _LIBCPP_CONSTEXPR const bool is_exact = true;
anatofuz
parents:
diff changeset
266 static _LIBCPP_CONSTEXPR const int radix = 2;
anatofuz
parents:
diff changeset
267 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
268 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
269
anatofuz
parents:
diff changeset
270 static _LIBCPP_CONSTEXPR const int min_exponent = 0;
anatofuz
parents:
diff changeset
271 static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
anatofuz
parents:
diff changeset
272 static _LIBCPP_CONSTEXPR const int max_exponent = 0;
anatofuz
parents:
diff changeset
273 static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
anatofuz
parents:
diff changeset
274
anatofuz
parents:
diff changeset
275 static _LIBCPP_CONSTEXPR const bool has_infinity = false;
anatofuz
parents:
diff changeset
276 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
anatofuz
parents:
diff changeset
277 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
anatofuz
parents:
diff changeset
278 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
anatofuz
parents:
diff changeset
279 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
anatofuz
parents:
diff changeset
280 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
281 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
282 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
283 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}
anatofuz
parents:
diff changeset
284
anatofuz
parents:
diff changeset
285 static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
anatofuz
parents:
diff changeset
286 static _LIBCPP_CONSTEXPR const bool is_bounded = true;
anatofuz
parents:
diff changeset
287 static _LIBCPP_CONSTEXPR const bool is_modulo = false;
anatofuz
parents:
diff changeset
288
anatofuz
parents:
diff changeset
289 static _LIBCPP_CONSTEXPR const bool traps = false;
anatofuz
parents:
diff changeset
290 static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
anatofuz
parents:
diff changeset
291 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
anatofuz
parents:
diff changeset
292 };
anatofuz
parents:
diff changeset
293
anatofuz
parents:
diff changeset
294 template <>
anatofuz
parents:
diff changeset
295 class __libcpp_numeric_limits<float, true>
anatofuz
parents:
diff changeset
296 {
anatofuz
parents:
diff changeset
297 protected:
anatofuz
parents:
diff changeset
298 typedef float type;
anatofuz
parents:
diff changeset
299
anatofuz
parents:
diff changeset
300 static _LIBCPP_CONSTEXPR const bool is_specialized = true;
anatofuz
parents:
diff changeset
301
anatofuz
parents:
diff changeset
302 static _LIBCPP_CONSTEXPR const bool is_signed = true;
anatofuz
parents:
diff changeset
303 static _LIBCPP_CONSTEXPR const int digits = __FLT_MANT_DIG__;
anatofuz
parents:
diff changeset
304 static _LIBCPP_CONSTEXPR const int digits10 = __FLT_DIG__;
anatofuz
parents:
diff changeset
305 static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l;
anatofuz
parents:
diff changeset
306 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __FLT_MIN__;}
anatofuz
parents:
diff changeset
307 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __FLT_MAX__;}
anatofuz
parents:
diff changeset
308 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
anatofuz
parents:
diff changeset
309
anatofuz
parents:
diff changeset
310 static _LIBCPP_CONSTEXPR const bool is_integer = false;
anatofuz
parents:
diff changeset
311 static _LIBCPP_CONSTEXPR const bool is_exact = false;
anatofuz
parents:
diff changeset
312 static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
anatofuz
parents:
diff changeset
313 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __FLT_EPSILON__;}
anatofuz
parents:
diff changeset
314 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5F;}
anatofuz
parents:
diff changeset
315
anatofuz
parents:
diff changeset
316 static _LIBCPP_CONSTEXPR const int min_exponent = __FLT_MIN_EXP__;
anatofuz
parents:
diff changeset
317 static _LIBCPP_CONSTEXPR const int min_exponent10 = __FLT_MIN_10_EXP__;
anatofuz
parents:
diff changeset
318 static _LIBCPP_CONSTEXPR const int max_exponent = __FLT_MAX_EXP__;
anatofuz
parents:
diff changeset
319 static _LIBCPP_CONSTEXPR const int max_exponent10 = __FLT_MAX_10_EXP__;
anatofuz
parents:
diff changeset
320
anatofuz
parents:
diff changeset
321 static _LIBCPP_CONSTEXPR const bool has_infinity = true;
anatofuz
parents:
diff changeset
322 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
anatofuz
parents:
diff changeset
323 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
anatofuz
parents:
diff changeset
324 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
anatofuz
parents:
diff changeset
325 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
anatofuz
parents:
diff changeset
326 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_valf();}
anatofuz
parents:
diff changeset
327 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanf("");}
anatofuz
parents:
diff changeset
328 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansf("");}
anatofuz
parents:
diff changeset
329 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __FLT_DENORM_MIN__;}
anatofuz
parents:
diff changeset
330
anatofuz
parents:
diff changeset
331 static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
anatofuz
parents:
diff changeset
332 static _LIBCPP_CONSTEXPR const bool is_bounded = true;
anatofuz
parents:
diff changeset
333 static _LIBCPP_CONSTEXPR const bool is_modulo = false;
anatofuz
parents:
diff changeset
334
anatofuz
parents:
diff changeset
335 static _LIBCPP_CONSTEXPR const bool traps = false;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
336 #if (defined(__arm__) || defined(__aarch64__))
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
337 static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
338 #else
150
anatofuz
parents:
diff changeset
339 static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
340 #endif
150
anatofuz
parents:
diff changeset
341 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
anatofuz
parents:
diff changeset
342 };
anatofuz
parents:
diff changeset
343
anatofuz
parents:
diff changeset
344 template <>
anatofuz
parents:
diff changeset
345 class __libcpp_numeric_limits<double, true>
anatofuz
parents:
diff changeset
346 {
anatofuz
parents:
diff changeset
347 protected:
anatofuz
parents:
diff changeset
348 typedef double type;
anatofuz
parents:
diff changeset
349
anatofuz
parents:
diff changeset
350 static _LIBCPP_CONSTEXPR const bool is_specialized = true;
anatofuz
parents:
diff changeset
351
anatofuz
parents:
diff changeset
352 static _LIBCPP_CONSTEXPR const bool is_signed = true;
anatofuz
parents:
diff changeset
353 static _LIBCPP_CONSTEXPR const int digits = __DBL_MANT_DIG__;
anatofuz
parents:
diff changeset
354 static _LIBCPP_CONSTEXPR const int digits10 = __DBL_DIG__;
anatofuz
parents:
diff changeset
355 static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l;
anatofuz
parents:
diff changeset
356 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __DBL_MIN__;}
anatofuz
parents:
diff changeset
357 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __DBL_MAX__;}
anatofuz
parents:
diff changeset
358 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
anatofuz
parents:
diff changeset
359
anatofuz
parents:
diff changeset
360 static _LIBCPP_CONSTEXPR const bool is_integer = false;
anatofuz
parents:
diff changeset
361 static _LIBCPP_CONSTEXPR const bool is_exact = false;
anatofuz
parents:
diff changeset
362 static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
anatofuz
parents:
diff changeset
363 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __DBL_EPSILON__;}
anatofuz
parents:
diff changeset
364 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5;}
anatofuz
parents:
diff changeset
365
anatofuz
parents:
diff changeset
366 static _LIBCPP_CONSTEXPR const int min_exponent = __DBL_MIN_EXP__;
anatofuz
parents:
diff changeset
367 static _LIBCPP_CONSTEXPR const int min_exponent10 = __DBL_MIN_10_EXP__;
anatofuz
parents:
diff changeset
368 static _LIBCPP_CONSTEXPR const int max_exponent = __DBL_MAX_EXP__;
anatofuz
parents:
diff changeset
369 static _LIBCPP_CONSTEXPR const int max_exponent10 = __DBL_MAX_10_EXP__;
anatofuz
parents:
diff changeset
370
anatofuz
parents:
diff changeset
371 static _LIBCPP_CONSTEXPR const bool has_infinity = true;
anatofuz
parents:
diff changeset
372 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
anatofuz
parents:
diff changeset
373 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
anatofuz
parents:
diff changeset
374 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
anatofuz
parents:
diff changeset
375 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
anatofuz
parents:
diff changeset
376 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_val();}
anatofuz
parents:
diff changeset
377 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nan("");}
anatofuz
parents:
diff changeset
378 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nans("");}
anatofuz
parents:
diff changeset
379 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __DBL_DENORM_MIN__;}
anatofuz
parents:
diff changeset
380
anatofuz
parents:
diff changeset
381 static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
anatofuz
parents:
diff changeset
382 static _LIBCPP_CONSTEXPR const bool is_bounded = true;
anatofuz
parents:
diff changeset
383 static _LIBCPP_CONSTEXPR const bool is_modulo = false;
anatofuz
parents:
diff changeset
384
anatofuz
parents:
diff changeset
385 static _LIBCPP_CONSTEXPR const bool traps = false;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
386 #if (defined(__arm__) || defined(__aarch64__))
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
387 static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
388 #else
150
anatofuz
parents:
diff changeset
389 static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
390 #endif
150
anatofuz
parents:
diff changeset
391 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
anatofuz
parents:
diff changeset
392 };
anatofuz
parents:
diff changeset
393
anatofuz
parents:
diff changeset
394 template <>
anatofuz
parents:
diff changeset
395 class __libcpp_numeric_limits<long double, true>
anatofuz
parents:
diff changeset
396 {
anatofuz
parents:
diff changeset
397 protected:
anatofuz
parents:
diff changeset
398 typedef long double type;
anatofuz
parents:
diff changeset
399
anatofuz
parents:
diff changeset
400 static _LIBCPP_CONSTEXPR const bool is_specialized = true;
anatofuz
parents:
diff changeset
401
anatofuz
parents:
diff changeset
402 static _LIBCPP_CONSTEXPR const bool is_signed = true;
anatofuz
parents:
diff changeset
403 static _LIBCPP_CONSTEXPR const int digits = __LDBL_MANT_DIG__;
anatofuz
parents:
diff changeset
404 static _LIBCPP_CONSTEXPR const int digits10 = __LDBL_DIG__;
anatofuz
parents:
diff changeset
405 static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l;
anatofuz
parents:
diff changeset
406 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __LDBL_MIN__;}
anatofuz
parents:
diff changeset
407 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __LDBL_MAX__;}
anatofuz
parents:
diff changeset
408 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
anatofuz
parents:
diff changeset
409
anatofuz
parents:
diff changeset
410 static _LIBCPP_CONSTEXPR const bool is_integer = false;
anatofuz
parents:
diff changeset
411 static _LIBCPP_CONSTEXPR const bool is_exact = false;
anatofuz
parents:
diff changeset
412 static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
anatofuz
parents:
diff changeset
413 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __LDBL_EPSILON__;}
anatofuz
parents:
diff changeset
414 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5L;}
anatofuz
parents:
diff changeset
415
anatofuz
parents:
diff changeset
416 static _LIBCPP_CONSTEXPR const int min_exponent = __LDBL_MIN_EXP__;
anatofuz
parents:
diff changeset
417 static _LIBCPP_CONSTEXPR const int min_exponent10 = __LDBL_MIN_10_EXP__;
anatofuz
parents:
diff changeset
418 static _LIBCPP_CONSTEXPR const int max_exponent = __LDBL_MAX_EXP__;
anatofuz
parents:
diff changeset
419 static _LIBCPP_CONSTEXPR const int max_exponent10 = __LDBL_MAX_10_EXP__;
anatofuz
parents:
diff changeset
420
anatofuz
parents:
diff changeset
421 static _LIBCPP_CONSTEXPR const bool has_infinity = true;
anatofuz
parents:
diff changeset
422 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
anatofuz
parents:
diff changeset
423 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
anatofuz
parents:
diff changeset
424 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
anatofuz
parents:
diff changeset
425 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
anatofuz
parents:
diff changeset
426 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_vall();}
anatofuz
parents:
diff changeset
427 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanl("");}
anatofuz
parents:
diff changeset
428 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
anatofuz
parents:
diff changeset
429 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
anatofuz
parents:
diff changeset
430
anatofuz
parents:
diff changeset
431 #if (defined(__ppc__) || defined(__ppc64__))
anatofuz
parents:
diff changeset
432 static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
anatofuz
parents:
diff changeset
433 #else
anatofuz
parents:
diff changeset
434 static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
anatofuz
parents:
diff changeset
435 #endif
anatofuz
parents:
diff changeset
436 static _LIBCPP_CONSTEXPR const bool is_bounded = true;
anatofuz
parents:
diff changeset
437 static _LIBCPP_CONSTEXPR const bool is_modulo = false;
anatofuz
parents:
diff changeset
438
anatofuz
parents:
diff changeset
439 static _LIBCPP_CONSTEXPR const bool traps = false;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
440 #if (defined(__arm__) || defined(__aarch64__))
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
441 static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
442 #else
150
anatofuz
parents:
diff changeset
443 static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
444 #endif
150
anatofuz
parents:
diff changeset
445 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
anatofuz
parents:
diff changeset
446 };
anatofuz
parents:
diff changeset
447
anatofuz
parents:
diff changeset
448 template <class _Tp>
anatofuz
parents:
diff changeset
449 class _LIBCPP_TEMPLATE_VIS numeric_limits
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
450 : private __libcpp_numeric_limits<__remove_cv_t<_Tp> >
150
anatofuz
parents:
diff changeset
451 {
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
452 typedef __libcpp_numeric_limits<__remove_cv_t<_Tp> > __base;
150
anatofuz
parents:
diff changeset
453 typedef typename __base::type type;
anatofuz
parents:
diff changeset
454 public:
anatofuz
parents:
diff changeset
455 static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
anatofuz
parents:
diff changeset
456 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
anatofuz
parents:
diff changeset
457 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
anatofuz
parents:
diff changeset
458 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
anatofuz
parents:
diff changeset
459
anatofuz
parents:
diff changeset
460 static _LIBCPP_CONSTEXPR const int digits = __base::digits;
anatofuz
parents:
diff changeset
461 static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
anatofuz
parents:
diff changeset
462 static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
anatofuz
parents:
diff changeset
463 static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
anatofuz
parents:
diff changeset
464 static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
anatofuz
parents:
diff changeset
465 static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
anatofuz
parents:
diff changeset
466 static _LIBCPP_CONSTEXPR const int radix = __base::radix;
anatofuz
parents:
diff changeset
467 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
anatofuz
parents:
diff changeset
468 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
anatofuz
parents:
diff changeset
469
anatofuz
parents:
diff changeset
470 static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
anatofuz
parents:
diff changeset
471 static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
anatofuz
parents:
diff changeset
472 static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
anatofuz
parents:
diff changeset
473 static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
anatofuz
parents:
diff changeset
474
anatofuz
parents:
diff changeset
475 static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
anatofuz
parents:
diff changeset
476 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
anatofuz
parents:
diff changeset
477 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
anatofuz
parents:
diff changeset
478 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
anatofuz
parents:
diff changeset
479 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
anatofuz
parents:
diff changeset
480 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
anatofuz
parents:
diff changeset
481 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
anatofuz
parents:
diff changeset
482 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
anatofuz
parents:
diff changeset
483 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
anatofuz
parents:
diff changeset
484
anatofuz
parents:
diff changeset
485 static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
anatofuz
parents:
diff changeset
486 static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
anatofuz
parents:
diff changeset
487 static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
anatofuz
parents:
diff changeset
488
anatofuz
parents:
diff changeset
489 static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
anatofuz
parents:
diff changeset
490 static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
anatofuz
parents:
diff changeset
491 static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
anatofuz
parents:
diff changeset
492 };
anatofuz
parents:
diff changeset
493
anatofuz
parents:
diff changeset
494 template <class _Tp>
anatofuz
parents:
diff changeset
495 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_specialized;
anatofuz
parents:
diff changeset
496 template <class _Tp>
anatofuz
parents:
diff changeset
497 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits;
anatofuz
parents:
diff changeset
498 template <class _Tp>
anatofuz
parents:
diff changeset
499 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits10;
anatofuz
parents:
diff changeset
500 template <class _Tp>
anatofuz
parents:
diff changeset
501 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_digits10;
anatofuz
parents:
diff changeset
502 template <class _Tp>
anatofuz
parents:
diff changeset
503 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_signed;
anatofuz
parents:
diff changeset
504 template <class _Tp>
anatofuz
parents:
diff changeset
505 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_integer;
anatofuz
parents:
diff changeset
506 template <class _Tp>
anatofuz
parents:
diff changeset
507 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_exact;
anatofuz
parents:
diff changeset
508 template <class _Tp>
anatofuz
parents:
diff changeset
509 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::radix;
anatofuz
parents:
diff changeset
510 template <class _Tp>
anatofuz
parents:
diff changeset
511 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent;
anatofuz
parents:
diff changeset
512 template <class _Tp>
anatofuz
parents:
diff changeset
513 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent10;
anatofuz
parents:
diff changeset
514 template <class _Tp>
anatofuz
parents:
diff changeset
515 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent;
anatofuz
parents:
diff changeset
516 template <class _Tp>
anatofuz
parents:
diff changeset
517 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent10;
anatofuz
parents:
diff changeset
518 template <class _Tp>
anatofuz
parents:
diff changeset
519 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_infinity;
anatofuz
parents:
diff changeset
520 template <class _Tp>
anatofuz
parents:
diff changeset
521 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_quiet_NaN;
anatofuz
parents:
diff changeset
522 template <class _Tp>
anatofuz
parents:
diff changeset
523 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_signaling_NaN;
anatofuz
parents:
diff changeset
524 template <class _Tp>
anatofuz
parents:
diff changeset
525 _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<_Tp>::has_denorm;
anatofuz
parents:
diff changeset
526 template <class _Tp>
anatofuz
parents:
diff changeset
527 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_denorm_loss;
anatofuz
parents:
diff changeset
528 template <class _Tp>
anatofuz
parents:
diff changeset
529 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_iec559;
anatofuz
parents:
diff changeset
530 template <class _Tp>
anatofuz
parents:
diff changeset
531 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_bounded;
anatofuz
parents:
diff changeset
532 template <class _Tp>
anatofuz
parents:
diff changeset
533 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_modulo;
anatofuz
parents:
diff changeset
534 template <class _Tp>
anatofuz
parents:
diff changeset
535 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::traps;
anatofuz
parents:
diff changeset
536 template <class _Tp>
anatofuz
parents:
diff changeset
537 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::tinyness_before;
anatofuz
parents:
diff changeset
538 template <class _Tp>
anatofuz
parents:
diff changeset
539 _LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style;
anatofuz
parents:
diff changeset
540
anatofuz
parents:
diff changeset
541 template <class _Tp>
anatofuz
parents:
diff changeset
542 class _LIBCPP_TEMPLATE_VIS numeric_limits<const _Tp>
anatofuz
parents:
diff changeset
543 : private numeric_limits<_Tp>
anatofuz
parents:
diff changeset
544 {
anatofuz
parents:
diff changeset
545 typedef numeric_limits<_Tp> __base;
anatofuz
parents:
diff changeset
546 typedef _Tp type;
anatofuz
parents:
diff changeset
547 public:
anatofuz
parents:
diff changeset
548 static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
anatofuz
parents:
diff changeset
549 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
anatofuz
parents:
diff changeset
550 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
anatofuz
parents:
diff changeset
551 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
anatofuz
parents:
diff changeset
552
anatofuz
parents:
diff changeset
553 static _LIBCPP_CONSTEXPR const int digits = __base::digits;
anatofuz
parents:
diff changeset
554 static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
anatofuz
parents:
diff changeset
555 static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
anatofuz
parents:
diff changeset
556 static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
anatofuz
parents:
diff changeset
557 static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
anatofuz
parents:
diff changeset
558 static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
anatofuz
parents:
diff changeset
559 static _LIBCPP_CONSTEXPR const int radix = __base::radix;
anatofuz
parents:
diff changeset
560 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
anatofuz
parents:
diff changeset
561 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
anatofuz
parents:
diff changeset
562
anatofuz
parents:
diff changeset
563 static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
anatofuz
parents:
diff changeset
564 static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
anatofuz
parents:
diff changeset
565 static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
anatofuz
parents:
diff changeset
566 static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
anatofuz
parents:
diff changeset
567
anatofuz
parents:
diff changeset
568 static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
anatofuz
parents:
diff changeset
569 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
anatofuz
parents:
diff changeset
570 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
anatofuz
parents:
diff changeset
571 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
anatofuz
parents:
diff changeset
572 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
anatofuz
parents:
diff changeset
573 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
anatofuz
parents:
diff changeset
574 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
anatofuz
parents:
diff changeset
575 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
anatofuz
parents:
diff changeset
576 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
anatofuz
parents:
diff changeset
577
anatofuz
parents:
diff changeset
578 static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
anatofuz
parents:
diff changeset
579 static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
anatofuz
parents:
diff changeset
580 static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
anatofuz
parents:
diff changeset
581
anatofuz
parents:
diff changeset
582 static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
anatofuz
parents:
diff changeset
583 static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
anatofuz
parents:
diff changeset
584 static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
anatofuz
parents:
diff changeset
585 };
anatofuz
parents:
diff changeset
586
anatofuz
parents:
diff changeset
587 template <class _Tp>
anatofuz
parents:
diff changeset
588 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_specialized;
anatofuz
parents:
diff changeset
589 template <class _Tp>
anatofuz
parents:
diff changeset
590 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits;
anatofuz
parents:
diff changeset
591 template <class _Tp>
anatofuz
parents:
diff changeset
592 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits10;
anatofuz
parents:
diff changeset
593 template <class _Tp>
anatofuz
parents:
diff changeset
594 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_digits10;
anatofuz
parents:
diff changeset
595 template <class _Tp>
anatofuz
parents:
diff changeset
596 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_signed;
anatofuz
parents:
diff changeset
597 template <class _Tp>
anatofuz
parents:
diff changeset
598 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_integer;
anatofuz
parents:
diff changeset
599 template <class _Tp>
anatofuz
parents:
diff changeset
600 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_exact;
anatofuz
parents:
diff changeset
601 template <class _Tp>
anatofuz
parents:
diff changeset
602 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::radix;
anatofuz
parents:
diff changeset
603 template <class _Tp>
anatofuz
parents:
diff changeset
604 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent;
anatofuz
parents:
diff changeset
605 template <class _Tp>
anatofuz
parents:
diff changeset
606 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent10;
anatofuz
parents:
diff changeset
607 template <class _Tp>
anatofuz
parents:
diff changeset
608 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent;
anatofuz
parents:
diff changeset
609 template <class _Tp>
anatofuz
parents:
diff changeset
610 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent10;
anatofuz
parents:
diff changeset
611 template <class _Tp>
anatofuz
parents:
diff changeset
612 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_infinity;
anatofuz
parents:
diff changeset
613 template <class _Tp>
anatofuz
parents:
diff changeset
614 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_quiet_NaN;
anatofuz
parents:
diff changeset
615 template <class _Tp>
anatofuz
parents:
diff changeset
616 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_signaling_NaN;
anatofuz
parents:
diff changeset
617 template <class _Tp>
anatofuz
parents:
diff changeset
618 _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const _Tp>::has_denorm;
anatofuz
parents:
diff changeset
619 template <class _Tp>
anatofuz
parents:
diff changeset
620 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_denorm_loss;
anatofuz
parents:
diff changeset
621 template <class _Tp>
anatofuz
parents:
diff changeset
622 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_iec559;
anatofuz
parents:
diff changeset
623 template <class _Tp>
anatofuz
parents:
diff changeset
624 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_bounded;
anatofuz
parents:
diff changeset
625 template <class _Tp>
anatofuz
parents:
diff changeset
626 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_modulo;
anatofuz
parents:
diff changeset
627 template <class _Tp>
anatofuz
parents:
diff changeset
628 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::traps;
anatofuz
parents:
diff changeset
629 template <class _Tp>
anatofuz
parents:
diff changeset
630 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::tinyness_before;
anatofuz
parents:
diff changeset
631 template <class _Tp>
anatofuz
parents:
diff changeset
632 _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const _Tp>::round_style;
anatofuz
parents:
diff changeset
633
anatofuz
parents:
diff changeset
634 template <class _Tp>
anatofuz
parents:
diff changeset
635 class _LIBCPP_TEMPLATE_VIS numeric_limits<volatile _Tp>
anatofuz
parents:
diff changeset
636 : private numeric_limits<_Tp>
anatofuz
parents:
diff changeset
637 {
anatofuz
parents:
diff changeset
638 typedef numeric_limits<_Tp> __base;
anatofuz
parents:
diff changeset
639 typedef _Tp type;
anatofuz
parents:
diff changeset
640 public:
anatofuz
parents:
diff changeset
641 static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
anatofuz
parents:
diff changeset
642 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
anatofuz
parents:
diff changeset
643 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
anatofuz
parents:
diff changeset
644 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
anatofuz
parents:
diff changeset
645
anatofuz
parents:
diff changeset
646 static _LIBCPP_CONSTEXPR const int digits = __base::digits;
anatofuz
parents:
diff changeset
647 static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
anatofuz
parents:
diff changeset
648 static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
anatofuz
parents:
diff changeset
649 static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
anatofuz
parents:
diff changeset
650 static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
anatofuz
parents:
diff changeset
651 static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
anatofuz
parents:
diff changeset
652 static _LIBCPP_CONSTEXPR const int radix = __base::radix;
anatofuz
parents:
diff changeset
653 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
anatofuz
parents:
diff changeset
654 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
anatofuz
parents:
diff changeset
655
anatofuz
parents:
diff changeset
656 static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
anatofuz
parents:
diff changeset
657 static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
anatofuz
parents:
diff changeset
658 static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
anatofuz
parents:
diff changeset
659 static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
anatofuz
parents:
diff changeset
660
anatofuz
parents:
diff changeset
661 static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
anatofuz
parents:
diff changeset
662 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
anatofuz
parents:
diff changeset
663 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
anatofuz
parents:
diff changeset
664 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
anatofuz
parents:
diff changeset
665 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
anatofuz
parents:
diff changeset
666 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
anatofuz
parents:
diff changeset
667 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
anatofuz
parents:
diff changeset
668 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
anatofuz
parents:
diff changeset
669 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
anatofuz
parents:
diff changeset
670
anatofuz
parents:
diff changeset
671 static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
anatofuz
parents:
diff changeset
672 static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
anatofuz
parents:
diff changeset
673 static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
anatofuz
parents:
diff changeset
674
anatofuz
parents:
diff changeset
675 static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
anatofuz
parents:
diff changeset
676 static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
anatofuz
parents:
diff changeset
677 static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
anatofuz
parents:
diff changeset
678 };
anatofuz
parents:
diff changeset
679
anatofuz
parents:
diff changeset
680 template <class _Tp>
anatofuz
parents:
diff changeset
681 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_specialized;
anatofuz
parents:
diff changeset
682 template <class _Tp>
anatofuz
parents:
diff changeset
683 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits;
anatofuz
parents:
diff changeset
684 template <class _Tp>
anatofuz
parents:
diff changeset
685 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits10;
anatofuz
parents:
diff changeset
686 template <class _Tp>
anatofuz
parents:
diff changeset
687 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_digits10;
anatofuz
parents:
diff changeset
688 template <class _Tp>
anatofuz
parents:
diff changeset
689 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_signed;
anatofuz
parents:
diff changeset
690 template <class _Tp>
anatofuz
parents:
diff changeset
691 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_integer;
anatofuz
parents:
diff changeset
692 template <class _Tp>
anatofuz
parents:
diff changeset
693 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_exact;
anatofuz
parents:
diff changeset
694 template <class _Tp>
anatofuz
parents:
diff changeset
695 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::radix;
anatofuz
parents:
diff changeset
696 template <class _Tp>
anatofuz
parents:
diff changeset
697 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent;
anatofuz
parents:
diff changeset
698 template <class _Tp>
anatofuz
parents:
diff changeset
699 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent10;
anatofuz
parents:
diff changeset
700 template <class _Tp>
anatofuz
parents:
diff changeset
701 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent;
anatofuz
parents:
diff changeset
702 template <class _Tp>
anatofuz
parents:
diff changeset
703 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent10;
anatofuz
parents:
diff changeset
704 template <class _Tp>
anatofuz
parents:
diff changeset
705 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_infinity;
anatofuz
parents:
diff changeset
706 template <class _Tp>
anatofuz
parents:
diff changeset
707 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_quiet_NaN;
anatofuz
parents:
diff changeset
708 template <class _Tp>
anatofuz
parents:
diff changeset
709 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_signaling_NaN;
anatofuz
parents:
diff changeset
710 template <class _Tp>
anatofuz
parents:
diff changeset
711 _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<volatile _Tp>::has_denorm;
anatofuz
parents:
diff changeset
712 template <class _Tp>
anatofuz
parents:
diff changeset
713 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_denorm_loss;
anatofuz
parents:
diff changeset
714 template <class _Tp>
anatofuz
parents:
diff changeset
715 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_iec559;
anatofuz
parents:
diff changeset
716 template <class _Tp>
anatofuz
parents:
diff changeset
717 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_bounded;
anatofuz
parents:
diff changeset
718 template <class _Tp>
anatofuz
parents:
diff changeset
719 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_modulo;
anatofuz
parents:
diff changeset
720 template <class _Tp>
anatofuz
parents:
diff changeset
721 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::traps;
anatofuz
parents:
diff changeset
722 template <class _Tp>
anatofuz
parents:
diff changeset
723 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::tinyness_before;
anatofuz
parents:
diff changeset
724 template <class _Tp>
anatofuz
parents:
diff changeset
725 _LIBCPP_CONSTEXPR const float_round_style numeric_limits<volatile _Tp>::round_style;
anatofuz
parents:
diff changeset
726
anatofuz
parents:
diff changeset
727 template <class _Tp>
anatofuz
parents:
diff changeset
728 class _LIBCPP_TEMPLATE_VIS numeric_limits<const volatile _Tp>
anatofuz
parents:
diff changeset
729 : private numeric_limits<_Tp>
anatofuz
parents:
diff changeset
730 {
anatofuz
parents:
diff changeset
731 typedef numeric_limits<_Tp> __base;
anatofuz
parents:
diff changeset
732 typedef _Tp type;
anatofuz
parents:
diff changeset
733 public:
anatofuz
parents:
diff changeset
734 static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
anatofuz
parents:
diff changeset
735 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
anatofuz
parents:
diff changeset
736 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
anatofuz
parents:
diff changeset
737 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
anatofuz
parents:
diff changeset
738
anatofuz
parents:
diff changeset
739 static _LIBCPP_CONSTEXPR const int digits = __base::digits;
anatofuz
parents:
diff changeset
740 static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
anatofuz
parents:
diff changeset
741 static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
anatofuz
parents:
diff changeset
742 static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
anatofuz
parents:
diff changeset
743 static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
anatofuz
parents:
diff changeset
744 static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
anatofuz
parents:
diff changeset
745 static _LIBCPP_CONSTEXPR const int radix = __base::radix;
anatofuz
parents:
diff changeset
746 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
anatofuz
parents:
diff changeset
747 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
anatofuz
parents:
diff changeset
748
anatofuz
parents:
diff changeset
749 static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
anatofuz
parents:
diff changeset
750 static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
anatofuz
parents:
diff changeset
751 static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
anatofuz
parents:
diff changeset
752 static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
anatofuz
parents:
diff changeset
753
anatofuz
parents:
diff changeset
754 static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
anatofuz
parents:
diff changeset
755 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
anatofuz
parents:
diff changeset
756 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
anatofuz
parents:
diff changeset
757 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
anatofuz
parents:
diff changeset
758 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
anatofuz
parents:
diff changeset
759 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
anatofuz
parents:
diff changeset
760 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
anatofuz
parents:
diff changeset
761 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
anatofuz
parents:
diff changeset
762 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
anatofuz
parents:
diff changeset
763
anatofuz
parents:
diff changeset
764 static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
anatofuz
parents:
diff changeset
765 static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
anatofuz
parents:
diff changeset
766 static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
anatofuz
parents:
diff changeset
767
anatofuz
parents:
diff changeset
768 static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
anatofuz
parents:
diff changeset
769 static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
anatofuz
parents:
diff changeset
770 static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
anatofuz
parents:
diff changeset
771 };
anatofuz
parents:
diff changeset
772
anatofuz
parents:
diff changeset
773 template <class _Tp>
anatofuz
parents:
diff changeset
774 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_specialized;
anatofuz
parents:
diff changeset
775 template <class _Tp>
anatofuz
parents:
diff changeset
776 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits;
anatofuz
parents:
diff changeset
777 template <class _Tp>
anatofuz
parents:
diff changeset
778 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits10;
anatofuz
parents:
diff changeset
779 template <class _Tp>
anatofuz
parents:
diff changeset
780 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_digits10;
anatofuz
parents:
diff changeset
781 template <class _Tp>
anatofuz
parents:
diff changeset
782 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_signed;
anatofuz
parents:
diff changeset
783 template <class _Tp>
anatofuz
parents:
diff changeset
784 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_integer;
anatofuz
parents:
diff changeset
785 template <class _Tp>
anatofuz
parents:
diff changeset
786 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_exact;
anatofuz
parents:
diff changeset
787 template <class _Tp>
anatofuz
parents:
diff changeset
788 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::radix;
anatofuz
parents:
diff changeset
789 template <class _Tp>
anatofuz
parents:
diff changeset
790 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent;
anatofuz
parents:
diff changeset
791 template <class _Tp>
anatofuz
parents:
diff changeset
792 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent10;
anatofuz
parents:
diff changeset
793 template <class _Tp>
anatofuz
parents:
diff changeset
794 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent;
anatofuz
parents:
diff changeset
795 template <class _Tp>
anatofuz
parents:
diff changeset
796 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent10;
anatofuz
parents:
diff changeset
797 template <class _Tp>
anatofuz
parents:
diff changeset
798 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_infinity;
anatofuz
parents:
diff changeset
799 template <class _Tp>
anatofuz
parents:
diff changeset
800 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_quiet_NaN;
anatofuz
parents:
diff changeset
801 template <class _Tp>
anatofuz
parents:
diff changeset
802 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_signaling_NaN;
anatofuz
parents:
diff changeset
803 template <class _Tp>
anatofuz
parents:
diff changeset
804 _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const volatile _Tp>::has_denorm;
anatofuz
parents:
diff changeset
805 template <class _Tp>
anatofuz
parents:
diff changeset
806 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_denorm_loss;
anatofuz
parents:
diff changeset
807 template <class _Tp>
anatofuz
parents:
diff changeset
808 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_iec559;
anatofuz
parents:
diff changeset
809 template <class _Tp>
anatofuz
parents:
diff changeset
810 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_bounded;
anatofuz
parents:
diff changeset
811 template <class _Tp>
anatofuz
parents:
diff changeset
812 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_modulo;
anatofuz
parents:
diff changeset
813 template <class _Tp>
anatofuz
parents:
diff changeset
814 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::traps;
anatofuz
parents:
diff changeset
815 template <class _Tp>
anatofuz
parents:
diff changeset
816 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::tinyness_before;
anatofuz
parents:
diff changeset
817 template <class _Tp>
anatofuz
parents:
diff changeset
818 _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const volatile _Tp>::round_style;
anatofuz
parents:
diff changeset
819
anatofuz
parents:
diff changeset
820 _LIBCPP_END_NAMESPACE_STD
anatofuz
parents:
diff changeset
821
anatofuz
parents:
diff changeset
822 _LIBCPP_POP_MACROS
anatofuz
parents:
diff changeset
823
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
824 #endif // _LIBCPP_LIMITS