| 1 |
// Static data members of -*- C++ -*- numeric_limits classes |
| 2 |
|
| 3 |
// Copyright (C) 1999-2025 Free Software Foundation, Inc. |
| 4 |
// |
| 5 |
// This file is part of the GNU ISO C++ Library. This library is free |
| 6 |
// software; you can redistribute it and/or modify it under the |
| 7 |
// terms of the GNU General Public License as published by the |
| 8 |
// Free Software Foundation; either version 3, or (at your option) |
| 9 |
// any later version. |
| 10 |
|
| 11 |
// This library is distributed in the hope that it will be useful, |
| 12 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
// GNU General Public License for more details. |
| 15 |
|
| 16 |
// Under Section 7 of GPL version 3, you are granted additional |
| 17 |
// permissions described in the GCC Runtime Library Exception, version |
| 18 |
// 3.1, as published by the Free Software Foundation. |
| 19 |
|
| 20 |
// You should have received a copy of the GNU General Public License and |
| 21 |
// a copy of the GCC Runtime Library Exception along with this program; |
| 22 |
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
| 23 |
// <http://www.gnu.org/licenses/>. |
| 24 |
|
| 25 |
// Written by Gabriel Dos Reis <[email protected]> |
| 26 |
|
| 27 |
// |
| 28 |
// ISO C++ 14882:1998 |
| 29 |
// 18.2.1 |
| 30 |
// |
| 31 |
|
| 32 |
#if __cpp_inline_variables |
| 33 |
# error This file must be compiled as C++11 or C++14 |
| 34 |
#endif |
| 35 |
|
| 36 |
#include <limits> |
| 37 |
|
| 38 |
namespace std _GLIBCXX_VISIBILITY(default) |
| 39 |
{ |
| 40 |
_GLIBCXX_BEGIN_NAMESPACE_VERSION |
| 41 |
|
| 42 |
#define const _GLIBCXX_USE_CONSTEXPR |
| 43 |
|
| 44 |
const bool __numeric_limits_base::is_specialized; |
| 45 |
const int __numeric_limits_base::digits; |
| 46 |
const int __numeric_limits_base::digits10; |
| 47 |
const int __numeric_limits_base::max_digits10; |
| 48 |
const bool __numeric_limits_base::is_signed; |
| 49 |
const bool __numeric_limits_base::is_integer; |
| 50 |
const bool __numeric_limits_base::is_exact; |
| 51 |
const int __numeric_limits_base::radix; |
| 52 |
const int __numeric_limits_base::min_exponent; |
| 53 |
const int __numeric_limits_base::min_exponent10; |
| 54 |
const int __numeric_limits_base::max_exponent; |
| 55 |
const int __numeric_limits_base::max_exponent10; |
| 56 |
const bool __numeric_limits_base::has_infinity; |
| 57 |
const bool __numeric_limits_base::has_quiet_NaN; |
| 58 |
const bool __numeric_limits_base::has_signaling_NaN; |
| 59 |
const float_denorm_style __numeric_limits_base::has_denorm; |
| 60 |
const bool __numeric_limits_base::has_denorm_loss; |
| 61 |
const bool __numeric_limits_base::is_iec559; |
| 62 |
const bool __numeric_limits_base::is_bounded; |
| 63 |
const bool __numeric_limits_base::is_modulo; |
| 64 |
const bool __numeric_limits_base::traps; |
| 65 |
const bool __numeric_limits_base::tinyness_before; |
| 66 |
const float_round_style __numeric_limits_base::round_style; |
| 67 |
|
| 68 |
// bool |
| 69 |
const bool numeric_limits<bool>::is_specialized; |
| 70 |
const int numeric_limits<bool>::digits; |
| 71 |
const int numeric_limits<bool>::digits10; |
| 72 |
const int numeric_limits<bool>::max_digits10; |
| 73 |
const bool numeric_limits<bool>::is_signed; |
| 74 |
const bool numeric_limits<bool>::is_integer; |
| 75 |
const bool numeric_limits<bool>::is_exact; |
| 76 |
const int numeric_limits<bool>::radix; |
| 77 |
const int numeric_limits<bool>::min_exponent; |
| 78 |
const int numeric_limits<bool>::min_exponent10; |
| 79 |
const int numeric_limits<bool>::max_exponent; |
| 80 |
const int numeric_limits<bool>::max_exponent10; |
| 81 |
const bool numeric_limits<bool>::has_infinity; |
| 82 |
const bool numeric_limits<bool>::has_quiet_NaN; |
| 83 |
const bool numeric_limits<bool>::has_signaling_NaN; |
| 84 |
const float_denorm_style numeric_limits<bool>::has_denorm; |
| 85 |
const bool numeric_limits<bool>::has_denorm_loss; |
| 86 |
const bool numeric_limits<bool>::is_iec559; |
| 87 |
const bool numeric_limits<bool>::is_bounded; |
| 88 |
const bool numeric_limits<bool>::is_modulo; |
| 89 |
const bool numeric_limits<bool>::traps; |
| 90 |
const bool numeric_limits<bool>::tinyness_before; |
| 91 |
const float_round_style numeric_limits<bool>::round_style; |
| 92 |
|
| 93 |
// char |
| 94 |
const bool numeric_limits<char>::is_specialized; |
| 95 |
const int numeric_limits<char>::digits; |
| 96 |
const int numeric_limits<char>::digits10; |
| 97 |
const int numeric_limits<char>::max_digits10; |
| 98 |
const bool numeric_limits<char>::is_signed; |
| 99 |
const bool numeric_limits<char>::is_integer; |
| 100 |
const bool numeric_limits<char>::is_exact; |
| 101 |
const int numeric_limits<char>::radix; |
| 102 |
const int numeric_limits<char>::min_exponent; |
| 103 |
const int numeric_limits<char>::min_exponent10; |
| 104 |
const int numeric_limits<char>::max_exponent; |
| 105 |
const int numeric_limits<char>::max_exponent10; |
| 106 |
const bool numeric_limits<char>::has_infinity; |
| 107 |
const bool numeric_limits<char>::has_quiet_NaN; |
| 108 |
const bool numeric_limits<char>::has_signaling_NaN; |
| 109 |
const float_denorm_style numeric_limits<char>::has_denorm; |
| 110 |
const bool numeric_limits<char>::has_denorm_loss; |
| 111 |
const bool numeric_limits<char>::is_iec559; |
| 112 |
const bool numeric_limits<char>::is_bounded; |
| 113 |
const bool numeric_limits<char>::is_modulo; |
| 114 |
const bool numeric_limits<char>::traps; |
| 115 |
const bool numeric_limits<char>::tinyness_before; |
| 116 |
const float_round_style numeric_limits<char>::round_style; |
| 117 |
|
| 118 |
// signed char |
| 119 |
const bool numeric_limits<signed char>::is_specialized; |
| 120 |
const int numeric_limits<signed char>::digits; |
| 121 |
const int numeric_limits<signed char>::digits10; |
| 122 |
const int numeric_limits<signed char>::max_digits10; |
| 123 |
const bool numeric_limits<signed char>::is_signed; |
| 124 |
const bool numeric_limits<signed char>::is_integer; |
| 125 |
const bool numeric_limits<signed char>::is_exact; |
| 126 |
const int numeric_limits<signed char>::radix; |
| 127 |
const int numeric_limits<signed char>::min_exponent; |
| 128 |
const int numeric_limits<signed char>::min_exponent10; |
| 129 |
const int numeric_limits<signed char>::max_exponent; |
| 130 |
const int numeric_limits<signed char>::max_exponent10; |
| 131 |
const bool numeric_limits<signed char>::has_infinity; |
| 132 |
const bool numeric_limits<signed char>::has_quiet_NaN; |
| 133 |
const bool numeric_limits<signed char>::has_signaling_NaN; |
| 134 |
const float_denorm_style numeric_limits<signed char>::has_denorm; |
| 135 |
const bool numeric_limits<signed char>::has_denorm_loss; |
| 136 |
const bool numeric_limits<signed char>::is_iec559; |
| 137 |
const bool numeric_limits<signed char>::is_bounded; |
| 138 |
const bool numeric_limits<signed char>::is_modulo; |
| 139 |
const bool numeric_limits<signed char>::traps; |
| 140 |
const bool numeric_limits<signed char>::tinyness_before; |
| 141 |
const float_round_style numeric_limits<signed char>::round_style; |
| 142 |
|
| 143 |
// unsigned char |
| 144 |
const bool numeric_limits<unsigned char>::is_specialized; |
| 145 |
const int numeric_limits<unsigned char>::digits; |
| 146 |
const int numeric_limits<unsigned char>::digits10; |
| 147 |
const int numeric_limits<unsigned char>::max_digits10; |
| 148 |
const bool numeric_limits<unsigned char>::is_signed; |
| 149 |
const bool numeric_limits<unsigned char>::is_integer; |
| 150 |
const bool numeric_limits<unsigned char>::is_exact; |
| 151 |
const int numeric_limits<unsigned char>::radix; |
| 152 |
const int numeric_limits<unsigned char>::min_exponent; |
| 153 |
const int numeric_limits<unsigned char>::min_exponent10; |
| 154 |
const int numeric_limits<unsigned char>::max_exponent; |
| 155 |
const int numeric_limits<unsigned char>::max_exponent10; |
| 156 |
const bool numeric_limits<unsigned char>::has_infinity; |
| 157 |
const bool numeric_limits<unsigned char>::has_quiet_NaN; |
| 158 |
const bool numeric_limits<unsigned char>::has_signaling_NaN; |
| 159 |
const float_denorm_style numeric_limits<unsigned char>::has_denorm; |
| 160 |
const bool numeric_limits<unsigned char>::has_denorm_loss; |
| 161 |
const bool numeric_limits<unsigned char>::is_iec559; |
| 162 |
const bool numeric_limits<unsigned char>::is_bounded; |
| 163 |
const bool numeric_limits<unsigned char>::is_modulo; |
| 164 |
const bool numeric_limits<unsigned char>::traps; |
| 165 |
const bool numeric_limits<unsigned char>::tinyness_before; |
| 166 |
const float_round_style numeric_limits<unsigned char>::round_style; |
| 167 |
|
| 168 |
// wchar_t |
| 169 |
// This used to be problematic... |
| 170 |
#ifdef _GLIBCXX_USE_WCHAR_T |
| 171 |
const bool numeric_limits<wchar_t>::is_specialized; |
| 172 |
const int numeric_limits<wchar_t>::digits; |
| 173 |
const int numeric_limits<wchar_t>::digits10; |
| 174 |
const int numeric_limits<wchar_t>::max_digits10; |
| 175 |
const bool numeric_limits<wchar_t>::is_signed; |
| 176 |
const bool numeric_limits<wchar_t>::is_integer; |
| 177 |
const bool numeric_limits<wchar_t>::is_exact; |
| 178 |
const int numeric_limits<wchar_t>::radix; |
| 179 |
const int numeric_limits<wchar_t>::min_exponent; |
| 180 |
const int numeric_limits<wchar_t>::min_exponent10; |
| 181 |
const int numeric_limits<wchar_t>::max_exponent; |
| 182 |
const int numeric_limits<wchar_t>::max_exponent10; |
| 183 |
const bool numeric_limits<wchar_t>::has_infinity; |
| 184 |
const bool numeric_limits<wchar_t>::has_quiet_NaN; |
| 185 |
const bool numeric_limits<wchar_t>::has_signaling_NaN; |
| 186 |
const float_denorm_style numeric_limits<wchar_t>::has_denorm; |
| 187 |
const bool numeric_limits<wchar_t>::has_denorm_loss; |
| 188 |
const bool numeric_limits<wchar_t>::is_iec559; |
| 189 |
const bool numeric_limits<wchar_t>::is_bounded; |
| 190 |
const bool numeric_limits<wchar_t>::is_modulo; |
| 191 |
const bool numeric_limits<wchar_t>::traps; |
| 192 |
const bool numeric_limits<wchar_t>::tinyness_before; |
| 193 |
const float_round_style numeric_limits<wchar_t>::round_style; |
| 194 |
#endif // _GLIBCXX_USE_WCHAR_T |
| 195 |
|
| 196 |
// short |
| 197 |
const bool numeric_limits<short>::is_specialized; |
| 198 |
const int numeric_limits<short>::digits; |
| 199 |
const int numeric_limits<short>::digits10; |
| 200 |
const int numeric_limits<short>::max_digits10; |
| 201 |
const bool numeric_limits<short>::is_signed; |
| 202 |
const bool numeric_limits<short>::is_integer; |
| 203 |
const bool numeric_limits<short>::is_exact; |
| 204 |
const int numeric_limits<short>::radix; |
| 205 |
const int numeric_limits<short>::min_exponent; |
| 206 |
const int numeric_limits<short>::min_exponent10; |
| 207 |
const int numeric_limits<short>::max_exponent; |
| 208 |
const int numeric_limits<short>::max_exponent10; |
| 209 |
const bool numeric_limits<short>::has_infinity; |
| 210 |
const bool numeric_limits<short>::has_quiet_NaN; |
| 211 |
const bool numeric_limits<short>::has_signaling_NaN; |
| 212 |
const float_denorm_style numeric_limits<short>::has_denorm; |
| 213 |
const bool numeric_limits<short>::has_denorm_loss; |
| 214 |
const bool numeric_limits<short>::is_iec559; |
| 215 |
const bool numeric_limits<short>::is_bounded; |
| 216 |
const bool numeric_limits<short>::is_modulo; |
| 217 |
const bool numeric_limits<short>::traps; |
| 218 |
const bool numeric_limits<short>::tinyness_before; |
| 219 |
const float_round_style numeric_limits<short>::round_style; |
| 220 |
|
| 221 |
// unsigned short |
| 222 |
const bool numeric_limits<unsigned short>::is_specialized; |
| 223 |
const int numeric_limits<unsigned short>::digits; |
| 224 |
const int numeric_limits<unsigned short>::digits10; |
| 225 |
const int numeric_limits<unsigned short>::max_digits10; |
| 226 |
const bool numeric_limits<unsigned short>::is_signed; |
| 227 |
const bool numeric_limits<unsigned short>::is_integer; |
| 228 |
const bool numeric_limits<unsigned short>::is_exact; |
| 229 |
const int numeric_limits<unsigned short>::radix; |
| 230 |
const int numeric_limits<unsigned short>::min_exponent; |
| 231 |
const int numeric_limits<unsigned short>::min_exponent10; |
| 232 |
const int numeric_limits<unsigned short>::max_exponent; |
| 233 |
const int numeric_limits<unsigned short>::max_exponent10; |
| 234 |
const bool numeric_limits<unsigned short>::has_infinity; |
| 235 |
const bool numeric_limits<unsigned short>::has_quiet_NaN; |
| 236 |
const bool numeric_limits<unsigned short>::has_signaling_NaN; |
| 237 |
const float_denorm_style numeric_limits<unsigned short>::has_denorm; |
| 238 |
const bool numeric_limits<unsigned short>::has_denorm_loss; |
| 239 |
const bool numeric_limits<unsigned short>::is_iec559; |
| 240 |
const bool numeric_limits<unsigned short>::is_bounded; |
| 241 |
const bool numeric_limits<unsigned short>::is_modulo; |
| 242 |
const bool numeric_limits<unsigned short>::traps; |
| 243 |
const bool numeric_limits<unsigned short>::tinyness_before; |
| 244 |
const float_round_style numeric_limits<unsigned short>::round_style; |
| 245 |
|
| 246 |
// int |
| 247 |
const bool numeric_limits<int>::is_specialized; |
| 248 |
const int numeric_limits<int>::digits; |
| 249 |
const int numeric_limits<int>::digits10; |
| 250 |
const int numeric_limits<int>::max_digits10; |
| 251 |
const bool numeric_limits<int>::is_signed; |
| 252 |
const bool numeric_limits<int>::is_integer; |
| 253 |
const bool numeric_limits<int>::is_exact; |
| 254 |
const int numeric_limits<int>::radix; |
| 255 |
const int numeric_limits<int>::min_exponent; |
| 256 |
const int numeric_limits<int>::min_exponent10; |
| 257 |
const int numeric_limits<int>::max_exponent; |
| 258 |
const int numeric_limits<int>::max_exponent10; |
| 259 |
const bool numeric_limits<int>::has_infinity; |
| 260 |
const bool numeric_limits<int>::has_quiet_NaN; |
| 261 |
const bool numeric_limits<int>::has_signaling_NaN; |
| 262 |
const float_denorm_style numeric_limits<int>::has_denorm; |
| 263 |
const bool numeric_limits<int>::has_denorm_loss; |
| 264 |
const bool numeric_limits<int>::is_iec559; |
| 265 |
const bool numeric_limits<int>::is_bounded; |
| 266 |
const bool numeric_limits<int>::is_modulo; |
| 267 |
const bool numeric_limits<int>::traps; |
| 268 |
const bool numeric_limits<int>::tinyness_before; |
| 269 |
const float_round_style numeric_limits<int>::round_style; |
| 270 |
|
| 271 |
// unsigned int |
| 272 |
const bool numeric_limits<unsigned int>::is_specialized; |
| 273 |
const int numeric_limits<unsigned int>::digits; |
| 274 |
const int numeric_limits<unsigned int>::digits10; |
| 275 |
const int numeric_limits<unsigned int>::max_digits10; |
| 276 |
const bool numeric_limits<unsigned int>::is_signed; |
| 277 |
const bool numeric_limits<unsigned int>::is_integer; |
| 278 |
const bool numeric_limits<unsigned int>::is_exact; |
| 279 |
const int numeric_limits<unsigned int>::radix; |
| 280 |
const int numeric_limits<unsigned int>::min_exponent; |
| 281 |
const int numeric_limits<unsigned int>::min_exponent10; |
| 282 |
const int numeric_limits<unsigned int>::max_exponent; |
| 283 |
const int numeric_limits<unsigned int>::max_exponent10; |
| 284 |
const bool numeric_limits<unsigned int>::has_infinity; |
| 285 |
const bool numeric_limits<unsigned int>::has_quiet_NaN; |
| 286 |
const bool numeric_limits<unsigned int>::has_signaling_NaN; |
| 287 |
const float_denorm_style numeric_limits<unsigned int>::has_denorm; |
| 288 |
const bool numeric_limits<unsigned int>::has_denorm_loss; |
| 289 |
const bool numeric_limits<unsigned int>::is_iec559; |
| 290 |
const bool numeric_limits<unsigned int>::is_bounded; |
| 291 |
const bool numeric_limits<unsigned int>::is_modulo; |
| 292 |
const bool numeric_limits<unsigned int>::traps; |
| 293 |
const bool numeric_limits<unsigned int>::tinyness_before; |
| 294 |
const float_round_style numeric_limits<unsigned int>::round_style; |
| 295 |
|
| 296 |
// long |
| 297 |
const bool numeric_limits<long>::is_specialized; |
| 298 |
const int numeric_limits<long>::digits; |
| 299 |
const int numeric_limits<long>::digits10; |
| 300 |
const int numeric_limits<long>::max_digits10; |
| 301 |
const bool numeric_limits<long>::is_signed; |
| 302 |
const bool numeric_limits<long>::is_integer; |
| 303 |
const bool numeric_limits<long>::is_exact; |
| 304 |
const int numeric_limits<long>::radix; |
| 305 |
const int numeric_limits<long>::min_exponent; |
| 306 |
const int numeric_limits<long>::min_exponent10; |
| 307 |
const int numeric_limits<long>::max_exponent; |
| 308 |
const int numeric_limits<long>::max_exponent10; |
| 309 |
const bool numeric_limits<long>::has_infinity; |
| 310 |
const bool numeric_limits<long>::has_quiet_NaN; |
| 311 |
const bool numeric_limits<long>::has_signaling_NaN; |
| 312 |
const float_denorm_style numeric_limits<long>::has_denorm; |
| 313 |
const bool numeric_limits<long>::has_denorm_loss; |
| 314 |
const bool numeric_limits<long>::is_iec559; |
| 315 |
const bool numeric_limits<long>::is_bounded; |
| 316 |
const bool numeric_limits<long>::is_modulo; |
| 317 |
const bool numeric_limits<long>::traps; |
| 318 |
const bool numeric_limits<long>::tinyness_before; |
| 319 |
const float_round_style numeric_limits<long>::round_style; |
| 320 |
|
| 321 |
// unsigned long |
| 322 |
const bool numeric_limits<unsigned long>::is_specialized; |
| 323 |
const int numeric_limits<unsigned long>::digits; |
| 324 |
const int numeric_limits<unsigned long>::digits10; |
| 325 |
const int numeric_limits<unsigned long>::max_digits10; |
| 326 |
const bool numeric_limits<unsigned long>::is_signed; |
| 327 |
const bool numeric_limits<unsigned long>::is_integer; |
| 328 |
const bool numeric_limits<unsigned long>::is_exact; |
| 329 |
const int numeric_limits<unsigned long>::radix; |
| 330 |
const int numeric_limits<unsigned long>::min_exponent; |
| 331 |
const int numeric_limits<unsigned long>::min_exponent10; |
| 332 |
const int numeric_limits<unsigned long>::max_exponent; |
| 333 |
const int numeric_limits<unsigned long>::max_exponent10; |
| 334 |
const bool numeric_limits<unsigned long>::has_infinity; |
| 335 |
const bool numeric_limits<unsigned long>::has_quiet_NaN; |
| 336 |
const bool numeric_limits<unsigned long>::has_signaling_NaN; |
| 337 |
const float_denorm_style numeric_limits<unsigned long>::has_denorm; |
| 338 |
const bool numeric_limits<unsigned long>::has_denorm_loss; |
| 339 |
const bool numeric_limits<unsigned long>::is_iec559; |
| 340 |
const bool numeric_limits<unsigned long>::is_bounded; |
| 341 |
const bool numeric_limits<unsigned long>::is_modulo; |
| 342 |
const bool numeric_limits<unsigned long>::traps; |
| 343 |
const bool numeric_limits<unsigned long>::tinyness_before; |
| 344 |
const float_round_style numeric_limits<unsigned long>::round_style; |
| 345 |
|
| 346 |
// NOTA BENE: long long is an extension |
| 347 |
const bool numeric_limits<long long>::is_specialized; |
| 348 |
const int numeric_limits<long long>::digits; |
| 349 |
const int numeric_limits<long long>::digits10; |
| 350 |
const int numeric_limits<long long>::max_digits10; |
| 351 |
const bool numeric_limits<long long>::is_signed; |
| 352 |
const bool numeric_limits<long long>::is_integer; |
| 353 |
const bool numeric_limits<long long>::is_exact; |
| 354 |
const int numeric_limits<long long>::radix; |
| 355 |
const int numeric_limits<long long>::min_exponent; |
| 356 |
const int numeric_limits<long long>::min_exponent10; |
| 357 |
const int numeric_limits<long long>::max_exponent; |
| 358 |
const int numeric_limits<long long>::max_exponent10; |
| 359 |
const bool numeric_limits<long long>::has_infinity; |
| 360 |
const bool numeric_limits<long long>::has_quiet_NaN; |
| 361 |
const bool numeric_limits<long long>::has_signaling_NaN; |
| 362 |
const float_denorm_style numeric_limits<long long>::has_denorm; |
| 363 |
const bool numeric_limits<long long>::has_denorm_loss; |
| 364 |
const bool numeric_limits<long long>::is_iec559; |
| 365 |
const bool numeric_limits<long long>::is_bounded; |
| 366 |
const bool numeric_limits<long long>::is_modulo; |
| 367 |
const bool numeric_limits<long long>::traps; |
| 368 |
const bool numeric_limits<long long>::tinyness_before; |
| 369 |
const float_round_style numeric_limits<long long>::round_style; |
| 370 |
|
| 371 |
const bool numeric_limits<unsigned long long>::is_specialized; |
| 372 |
const int numeric_limits<unsigned long long>::digits; |
| 373 |
const int numeric_limits<unsigned long long>::digits10; |
| 374 |
const int numeric_limits<unsigned long long>::max_digits10; |
| 375 |
const bool numeric_limits<unsigned long long>::is_signed; |
| 376 |
const bool numeric_limits<unsigned long long>::is_integer; |
| 377 |
const bool numeric_limits<unsigned long long>::is_exact; |
| 378 |
const int numeric_limits<unsigned long long>::radix; |
| 379 |
const int numeric_limits<unsigned long long>::min_exponent; |
| 380 |
const int numeric_limits<unsigned long long>::min_exponent10; |
| 381 |
const int numeric_limits<unsigned long long>::max_exponent; |
| 382 |
const int numeric_limits<unsigned long long>::max_exponent10; |
| 383 |
const bool numeric_limits<unsigned long long>::has_infinity; |
| 384 |
const bool numeric_limits<unsigned long long>::has_quiet_NaN; |
| 385 |
const bool numeric_limits<unsigned long long>::has_signaling_NaN; |
| 386 |
const float_denorm_style numeric_limits<unsigned long long>::has_denorm; |
| 387 |
const bool numeric_limits<unsigned long long>::has_denorm_loss; |
| 388 |
const bool numeric_limits<unsigned long long>::is_iec559; |
| 389 |
const bool numeric_limits<unsigned long long>::is_bounded; |
| 390 |
const bool numeric_limits<unsigned long long>::is_modulo; |
| 391 |
const bool numeric_limits<unsigned long long>::traps; |
| 392 |
const bool numeric_limits<unsigned long long>::tinyness_before; |
| 393 |
const float_round_style numeric_limits<unsigned long long>::round_style; |
| 394 |
|
| 395 |
#define INT_N(__INT_N_TYPE) \ |
| 396 |
const bool numeric_limits<__INT_N_TYPE>::is_specialized; \ |
| 397 |
const int numeric_limits<__INT_N_TYPE>::digits; \ |
| 398 |
const int numeric_limits<__INT_N_TYPE>::digits10; \ |
| 399 |
const int numeric_limits<__INT_N_TYPE>::max_digits10; \ |
| 400 |
const bool numeric_limits<__INT_N_TYPE>::is_signed; \ |
| 401 |
const bool numeric_limits<__INT_N_TYPE>::is_integer; \ |
| 402 |
const bool numeric_limits<__INT_N_TYPE>::is_exact; \ |
| 403 |
const int numeric_limits<__INT_N_TYPE>::radix; \ |
| 404 |
const int numeric_limits<__INT_N_TYPE>::min_exponent; \ |
| 405 |
const int numeric_limits<__INT_N_TYPE>::min_exponent10; \ |
| 406 |
const int numeric_limits<__INT_N_TYPE>::max_exponent; \ |
| 407 |
const int numeric_limits<__INT_N_TYPE>::max_exponent10; \ |
| 408 |
const bool numeric_limits<__INT_N_TYPE>::has_infinity; \ |
| 409 |
const bool numeric_limits<__INT_N_TYPE>::has_quiet_NaN; \ |
| 410 |
const bool numeric_limits<__INT_N_TYPE>::has_signaling_NaN; \ |
| 411 |
const float_denorm_style numeric_limits<__INT_N_TYPE>::has_denorm; \ |
| 412 |
const bool numeric_limits<__INT_N_TYPE>::has_denorm_loss; \ |
| 413 |
const bool numeric_limits<__INT_N_TYPE>::is_iec559; \ |
| 414 |
const bool numeric_limits<__INT_N_TYPE>::is_bounded; \ |
| 415 |
const bool numeric_limits<__INT_N_TYPE>::is_modulo; \ |
| 416 |
const bool numeric_limits<__INT_N_TYPE>::traps; \ |
| 417 |
const bool numeric_limits<__INT_N_TYPE>::tinyness_before; \ |
| 418 |
const float_round_style numeric_limits<__INT_N_TYPE>::round_style; \ |
| 419 |
\ |
| 420 |
const bool numeric_limits<unsigned __INT_N_TYPE>::is_specialized; \ |
| 421 |
const int numeric_limits<unsigned __INT_N_TYPE>::digits; \ |
| 422 |
const int numeric_limits<unsigned __INT_N_TYPE>::digits10; \ |
| 423 |
const int numeric_limits<unsigned __INT_N_TYPE>::max_digits10; \ |
| 424 |
const bool numeric_limits<unsigned __INT_N_TYPE>::is_signed; \ |
| 425 |
const bool numeric_limits<unsigned __INT_N_TYPE>::is_integer; \ |
| 426 |
const bool numeric_limits<unsigned __INT_N_TYPE>::is_exact; \ |
| 427 |
const int numeric_limits<unsigned __INT_N_TYPE>::radix; \ |
| 428 |
const int numeric_limits<unsigned __INT_N_TYPE>::min_exponent; \ |
| 429 |
const int numeric_limits<unsigned __INT_N_TYPE>::min_exponent10; \ |
| 430 |
const int numeric_limits<unsigned __INT_N_TYPE>::max_exponent; \ |
| 431 |
const int numeric_limits<unsigned __INT_N_TYPE>::max_exponent10; \ |
| 432 |
const bool numeric_limits<unsigned __INT_N_TYPE>::has_infinity; \ |
| 433 |
const bool numeric_limits<unsigned __INT_N_TYPE>::has_quiet_NaN; \ |
| 434 |
const bool numeric_limits<unsigned __INT_N_TYPE>::has_signaling_NaN; \ |
| 435 |
const float_denorm_style numeric_limits<unsigned __INT_N_TYPE>::has_denorm; \ |
| 436 |
const bool numeric_limits<unsigned __INT_N_TYPE>::has_denorm_loss; \ |
| 437 |
const bool numeric_limits<unsigned __INT_N_TYPE>::is_iec559; \ |
| 438 |
const bool numeric_limits<unsigned __INT_N_TYPE>::is_bounded; \ |
| 439 |
const bool numeric_limits<unsigned __INT_N_TYPE>::is_modulo; \ |
| 440 |
const bool numeric_limits<unsigned __INT_N_TYPE>::traps; \ |
| 441 |
const bool numeric_limits<unsigned __INT_N_TYPE>::tinyness_before; \ |
| 442 |
const float_round_style numeric_limits<unsigned __INT_N_TYPE>::round_style; |
| 443 |
|
| 444 |
#ifdef __GLIBCXX_TYPE_INT_N_0 |
| 445 |
INT_N (__GLIBCXX_TYPE_INT_N_0) |
| 446 |
#endif |
| 447 |
#ifdef __GLIBCXX_TYPE_INT_N_1 |
| 448 |
INT_N (__GLIBCXX_TYPE_INT_N_1) |
| 449 |
#endif |
| 450 |
#ifdef __GLIBCXX_TYPE_INT_N_2 |
| 451 |
INT_N (__GLIBCXX_TYPE_INT_N_2) |
| 452 |
#endif |
| 453 |
#ifdef __GLIBCXX_TYPE_INT_N_3 |
| 454 |
INT_N (__GLIBCXX_TYPE_INT_N_3) |
| 455 |
#endif |
| 456 |
|
| 457 |
// float |
| 458 |
const bool numeric_limits<float>::is_specialized; |
| 459 |
const int numeric_limits<float>::digits; |
| 460 |
const int numeric_limits<float>::digits10; |
| 461 |
const int numeric_limits<float>::max_digits10; |
| 462 |
const bool numeric_limits<float>::is_signed; |
| 463 |
const bool numeric_limits<float>::is_integer; |
| 464 |
const bool numeric_limits<float>::is_exact; |
| 465 |
const int numeric_limits<float>::radix; |
| 466 |
const int numeric_limits<float>::min_exponent; |
| 467 |
const int numeric_limits<float>::min_exponent10; |
| 468 |
const int numeric_limits<float>::max_exponent; |
| 469 |
const int numeric_limits<float>::max_exponent10; |
| 470 |
const bool numeric_limits<float>::has_infinity; |
| 471 |
const bool numeric_limits<float>::has_quiet_NaN; |
| 472 |
const bool numeric_limits<float>::has_signaling_NaN; |
| 473 |
const float_denorm_style numeric_limits<float>::has_denorm; |
| 474 |
const bool numeric_limits<float>::has_denorm_loss; |
| 475 |
const bool numeric_limits<float>::is_iec559; |
| 476 |
const bool numeric_limits<float>::is_bounded; |
| 477 |
const bool numeric_limits<float>::is_modulo; |
| 478 |
const bool numeric_limits<float>::traps; |
| 479 |
const bool numeric_limits<float>::tinyness_before; |
| 480 |
const float_round_style numeric_limits<float>::round_style; |
| 481 |
|
| 482 |
// double |
| 483 |
const bool numeric_limits<double>::is_specialized; |
| 484 |
const int numeric_limits<double>::digits; |
| 485 |
const int numeric_limits<double>::digits10; |
| 486 |
const int numeric_limits<double>::max_digits10; |
| 487 |
const bool numeric_limits<double>::is_signed; |
| 488 |
const bool numeric_limits<double>::is_integer; |
| 489 |
const bool numeric_limits<double>::is_exact; |
| 490 |
const int numeric_limits<double>::radix; |
| 491 |
const int numeric_limits<double>::min_exponent; |
| 492 |
const int numeric_limits<double>::min_exponent10; |
| 493 |
const int numeric_limits<double>::max_exponent; |
| 494 |
const int numeric_limits<double>::max_exponent10; |
| 495 |
const bool numeric_limits<double>::has_infinity; |
| 496 |
const bool numeric_limits<double>::has_quiet_NaN; |
| 497 |
const bool numeric_limits<double>::has_signaling_NaN; |
| 498 |
const float_denorm_style numeric_limits<double>::has_denorm; |
| 499 |
const bool numeric_limits<double>::has_denorm_loss; |
| 500 |
const bool numeric_limits<double>::is_iec559; |
| 501 |
const bool numeric_limits<double>::is_bounded; |
| 502 |
const bool numeric_limits<double>::is_modulo; |
| 503 |
const bool numeric_limits<double>::traps; |
| 504 |
const bool numeric_limits<double>::tinyness_before; |
| 505 |
const float_round_style numeric_limits<double>::round_style; |
| 506 |
|
| 507 |
// long double |
| 508 |
const bool numeric_limits<long double>::is_specialized; |
| 509 |
const int numeric_limits<long double>::digits; |
| 510 |
const int numeric_limits<long double>::digits10; |
| 511 |
const int numeric_limits<long double>::max_digits10; |
| 512 |
const bool numeric_limits<long double>::is_signed; |
| 513 |
const bool numeric_limits<long double>::is_integer; |
| 514 |
const bool numeric_limits<long double>::is_exact; |
| 515 |
const int numeric_limits<long double>::radix; |
| 516 |
const int numeric_limits<long double>::min_exponent; |
| 517 |
const int numeric_limits<long double>::min_exponent10; |
| 518 |
const int numeric_limits<long double>::max_exponent; |
| 519 |
const int numeric_limits<long double>::max_exponent10; |
| 520 |
const bool numeric_limits<long double>::has_infinity; |
| 521 |
const bool numeric_limits<long double>::has_quiet_NaN; |
| 522 |
const bool numeric_limits<long double>::has_signaling_NaN; |
| 523 |
const float_denorm_style numeric_limits<long double>::has_denorm; |
| 524 |
const bool numeric_limits<long double>::has_denorm_loss; |
| 525 |
const bool numeric_limits<long double>::is_iec559; |
| 526 |
const bool numeric_limits<long double>::is_bounded; |
| 527 |
const bool numeric_limits<long double>::is_modulo; |
| 528 |
const bool numeric_limits<long double>::traps; |
| 529 |
const bool numeric_limits<long double>::tinyness_before; |
| 530 |
const float_round_style numeric_limits<long double>::round_style; |
| 531 |
|
| 532 |
#ifdef _GLIBCXX_USE_CHAR8_T |
| 533 |
// char8_t |
| 534 |
const bool numeric_limits<char8_t>::is_specialized; |
| 535 |
const int numeric_limits<char8_t>::digits; |
| 536 |
const int numeric_limits<char8_t>::digits10; |
| 537 |
const int numeric_limits<char8_t>::max_digits10; |
| 538 |
const bool numeric_limits<char8_t>::is_signed; |
| 539 |
const bool numeric_limits<char8_t>::is_integer; |
| 540 |
const bool numeric_limits<char8_t>::is_exact; |
| 541 |
const int numeric_limits<char8_t>::radix; |
| 542 |
const int numeric_limits<char8_t>::min_exponent; |
| 543 |
const int numeric_limits<char8_t>::min_exponent10; |
| 544 |
const int numeric_limits<char8_t>::max_exponent; |
| 545 |
const int numeric_limits<char8_t>::max_exponent10; |
| 546 |
const bool numeric_limits<char8_t>::has_infinity; |
| 547 |
const bool numeric_limits<char8_t>::has_quiet_NaN; |
| 548 |
const bool numeric_limits<char8_t>::has_signaling_NaN; |
| 549 |
const float_denorm_style numeric_limits<char8_t>::has_denorm; |
| 550 |
const bool numeric_limits<char8_t>::has_denorm_loss; |
| 551 |
const bool numeric_limits<char8_t>::is_iec559; |
| 552 |
const bool numeric_limits<char8_t>::is_bounded; |
| 553 |
const bool numeric_limits<char8_t>::is_modulo; |
| 554 |
const bool numeric_limits<char8_t>::traps; |
| 555 |
const bool numeric_limits<char8_t>::tinyness_before; |
| 556 |
const float_round_style numeric_limits<char8_t>::round_style; |
| 557 |
#endif // _GLIBCXX_USE_CHAR8_T |
| 558 |
|
| 559 |
// char16_t |
| 560 |
const bool numeric_limits<char16_t>::is_specialized; |
| 561 |
const int numeric_limits<char16_t>::digits; |
| 562 |
const int numeric_limits<char16_t>::digits10; |
| 563 |
const int numeric_limits<char16_t>::max_digits10; |
| 564 |
const bool numeric_limits<char16_t>::is_signed; |
| 565 |
const bool numeric_limits<char16_t>::is_integer; |
| 566 |
const bool numeric_limits<char16_t>::is_exact; |
| 567 |
const int numeric_limits<char16_t>::radix; |
| 568 |
const int numeric_limits<char16_t>::min_exponent; |
| 569 |
const int numeric_limits<char16_t>::min_exponent10; |
| 570 |
const int numeric_limits<char16_t>::max_exponent; |
| 571 |
const int numeric_limits<char16_t>::max_exponent10; |
| 572 |
const bool numeric_limits<char16_t>::has_infinity; |
| 573 |
const bool numeric_limits<char16_t>::has_quiet_NaN; |
| 574 |
const bool numeric_limits<char16_t>::has_signaling_NaN; |
| 575 |
const float_denorm_style numeric_limits<char16_t>::has_denorm; |
| 576 |
const bool numeric_limits<char16_t>::has_denorm_loss; |
| 577 |
const bool numeric_limits<char16_t>::is_iec559; |
| 578 |
const bool numeric_limits<char16_t>::is_bounded; |
| 579 |
const bool numeric_limits<char16_t>::is_modulo; |
| 580 |
const bool numeric_limits<char16_t>::traps; |
| 581 |
const bool numeric_limits<char16_t>::tinyness_before; |
| 582 |
const float_round_style numeric_limits<char16_t>::round_style; |
| 583 |
|
| 584 |
// char32_t |
| 585 |
const bool numeric_limits<char32_t>::is_specialized; |
| 586 |
const int numeric_limits<char32_t>::digits; |
| 587 |
const int numeric_limits<char32_t>::digits10; |
| 588 |
const int numeric_limits<char32_t>::max_digits10; |
| 589 |
const bool numeric_limits<char32_t>::is_signed; |
| 590 |
const bool numeric_limits<char32_t>::is_integer; |
| 591 |
const bool numeric_limits<char32_t>::is_exact; |
| 592 |
const int numeric_limits<char32_t>::radix; |
| 593 |
const int numeric_limits<char32_t>::min_exponent; |
| 594 |
const int numeric_limits<char32_t>::min_exponent10; |
| 595 |
const int numeric_limits<char32_t>::max_exponent; |
| 596 |
const int numeric_limits<char32_t>::max_exponent10; |
| 597 |
const bool numeric_limits<char32_t>::has_infinity; |
| 598 |
const bool numeric_limits<char32_t>::has_quiet_NaN; |
| 599 |
const bool numeric_limits<char32_t>::has_signaling_NaN; |
| 600 |
const float_denorm_style numeric_limits<char32_t>::has_denorm; |
| 601 |
const bool numeric_limits<char32_t>::has_denorm_loss; |
| 602 |
const bool numeric_limits<char32_t>::is_iec559; |
| 603 |
const bool numeric_limits<char32_t>::is_bounded; |
| 604 |
const bool numeric_limits<char32_t>::is_modulo; |
| 605 |
const bool numeric_limits<char32_t>::traps; |
| 606 |
const bool numeric_limits<char32_t>::tinyness_before; |
| 607 |
const float_round_style numeric_limits<char32_t>::round_style; |
| 608 |
|
| 609 |
#undef const |
| 610 |
|
| 611 |
_GLIBCXX_END_NAMESPACE_VERSION |
| 612 |
} // namespace |
| 613 |
|
| 614 |
// XXX GLIBCXX_ABI Deprecated |
| 615 |
#ifdef _GLIBCXX_LONG_DOUBLE_COMPAT |
| 616 |
|
| 617 |
#define _GLIBCXX_NUM_LIM_COMPAT(type, member, len) \ |
| 618 |
extern "C" type _ZNSt14numeric_limitsIeE ## len ## member ## E \ |
| 619 |
__attribute__ ((alias ("_ZNSt14numeric_limitsIdE" #len #member "E"))) |
| 620 |
_GLIBCXX_NUM_LIM_COMPAT (bool, is_specialized, 14); |
| 621 |
_GLIBCXX_NUM_LIM_COMPAT (int, digits, 6); |
| 622 |
_GLIBCXX_NUM_LIM_COMPAT (int, digits10, 8); |
| 623 |
_GLIBCXX_NUM_LIM_COMPAT (bool, is_signed, 9); |
| 624 |
_GLIBCXX_NUM_LIM_COMPAT (bool, is_integer, 10); |
| 625 |
_GLIBCXX_NUM_LIM_COMPAT (bool, is_exact, 8); |
| 626 |
_GLIBCXX_NUM_LIM_COMPAT (int, radix, 5); |
| 627 |
_GLIBCXX_NUM_LIM_COMPAT (int, min_exponent, 12); |
| 628 |
_GLIBCXX_NUM_LIM_COMPAT (int, min_exponent10, 14); |
| 629 |
_GLIBCXX_NUM_LIM_COMPAT (int, max_exponent, 12); |
| 630 |
_GLIBCXX_NUM_LIM_COMPAT (int, max_exponent10, 14); |
| 631 |
_GLIBCXX_NUM_LIM_COMPAT (bool, has_infinity, 12); |
| 632 |
_GLIBCXX_NUM_LIM_COMPAT (bool, has_quiet_NaN, 13); |
| 633 |
_GLIBCXX_NUM_LIM_COMPAT (bool, has_signaling_NaN, 17); |
| 634 |
_GLIBCXX_NUM_LIM_COMPAT (std::float_denorm_style, has_denorm, 10); |
| 635 |
_GLIBCXX_NUM_LIM_COMPAT (bool, has_denorm_loss, 15); |
| 636 |
_GLIBCXX_NUM_LIM_COMPAT (bool, is_iec559, 9); |
| 637 |
_GLIBCXX_NUM_LIM_COMPAT (bool, is_bounded, 10); |
| 638 |
_GLIBCXX_NUM_LIM_COMPAT (bool, is_modulo, 9); |
| 639 |
_GLIBCXX_NUM_LIM_COMPAT (bool, traps, 5); |
| 640 |
_GLIBCXX_NUM_LIM_COMPAT (bool, tinyness_before, 15); |
| 641 |
_GLIBCXX_NUM_LIM_COMPAT (std::float_round_style, round_style, 11); |
| 642 |
|
| 643 |
#endif // _GLIBCXX_LONG_DOUBLE_COMPAT |