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