epoc32/include/stdapis/stlport/stl/_limits.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/stlport/stl/_limits.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/stlport/stl/_limits.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,567 @@
     1.4 -_limits.h
     1.5 +/*
     1.6 + * © Portions copyright (c) 2006-2007 Nokia Corporation.  All rights reserved.
     1.7 + * Copyright (c) 1997
     1.8 + * Silicon Graphics Computer Systems, Inc.
     1.9 + *
    1.10 + * Copyright (c) 1999 
    1.11 + * Boris Fomitchev
    1.12 + *
    1.13 + * This material is provided "as is", with absolutely no warranty expressed
    1.14 + * or implied. Any use is at your own risk.
    1.15 + *
    1.16 + * Permission to use or copy this software for any purpose is hereby granted 
    1.17 + * without fee, provided the above notices are retained on all copies.
    1.18 + * Permission to modify the code and to distribute modified code is granted,
    1.19 + * provided the above notices are retained, and a notice that the code was
    1.20 + * modified is included with the above copyright notice.
    1.21 + *
    1.22 + */
    1.23 +
    1.24 +/* NOTE: This may be not portable code. Parts of numeric_limits<> are
    1.25 + * inherently machine-dependent.  At present this file is suitable
    1.26 + * for the MIPS, SPARC, Alpha and ia32 architectures.
    1.27 + */
    1.28 +
    1.29 +#ifndef _STLP_INTERNAL_LIMITS_H
    1.30 +# define _STLP_INTERNAL_LIMITS_H
    1.31 +
    1.32 +#ifndef _STLP_CLIMITS
    1.33 +# include <climits>
    1.34 +#endif
    1.35 +
    1.36 +#ifndef _STLP_CFLOAT
    1.37 +# include <cfloat>
    1.38 +#endif
    1.39 +
    1.40 +#if !defined (_STLP_NO_WCHAR_T) && !defined (_STLP_CWCHAR_H)
    1.41 +# include <stl/_cwchar.h>
    1.42 +#endif
    1.43 +
    1.44 +_STLP_BEGIN_NAMESPACE
    1.45 +
    1.46 +enum float_round_style {
    1.47 +  round_indeterminate       = -1,
    1.48 +  round_toward_zero         =  0,
    1.49 +  round_to_nearest          =  1,
    1.50 +  round_toward_infinity     =  2,
    1.51 +  round_toward_neg_infinity =  3
    1.52 +};
    1.53 +
    1.54 +enum float_denorm_style {
    1.55 +  denorm_indeterminate = -1,
    1.56 +  denorm_absent        =  0,
    1.57 +  denorm_present       =  1
    1.58 +};
    1.59 +
    1.60 +// Base class for all specializations of numeric_limits.
    1.61 +
    1.62 +template <class __number>
    1.63 +class _Numeric_limits_base {
    1.64 +public:
    1.65 +
    1.66 +  static __number (_STLP_CALL min)() _STLP_NOTHROW { return __number(); }
    1.67 +  static __number (_STLP_CALL max)() _STLP_NOTHROW { return __number(); }
    1.68 +
    1.69 +# if defined ( _STLP_STATIC_CONST_INIT_BUG)
    1.70 +  enum {
    1.71 +# else
    1.72 +  static const int 
    1.73 +# endif
    1.74 +  
    1.75 +  digits = 0,
    1.76 +  digits10 = 0,
    1.77 +  radix = 0,
    1.78 +  min_exponent = 0,
    1.79 +  min_exponent10 = 0,
    1.80 +  max_exponent = 0,
    1.81 +  max_exponent10 = 0
    1.82 +
    1.83 +# if defined ( _STLP_STATIC_CONST_INIT_BUG)
    1.84 +  ,  
    1.85 +  has_denorm = denorm_absent,
    1.86 +  round_style = round_toward_zero,
    1.87 +# else
    1.88 +  ;
    1.89 +  static const float_denorm_style has_denorm =  denorm_absent;
    1.90 +  static const float_round_style round_style = round_toward_zero;
    1.91 +  static const bool 
    1.92 +# endif
    1.93 +
    1.94 +    is_specialized = false,
    1.95 +    is_signed  = false,
    1.96 +    is_integer = false,
    1.97 +    is_exact = false,
    1.98 +    has_infinity = false,
    1.99 +    has_quiet_NaN = false,
   1.100 +    has_signaling_NaN = false,
   1.101 +    has_denorm_loss = false,
   1.102 +    is_iec559 = false,
   1.103 +    is_bounded = false,
   1.104 +    is_modulo = false,
   1.105 +    traps = false,
   1.106 +    tinyness_before = false
   1.107 +# if defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.108 +  }
   1.109 +# endif
   1.110 +  ;
   1.111 +    
   1.112 +  static __number _STLP_CALL epsilon() _STLP_NOTHROW     { return __number(); }
   1.113 +  static __number _STLP_CALL round_error() _STLP_NOTHROW { return __number(); }
   1.114 +
   1.115 +  static __number _STLP_CALL infinity() _STLP_NOTHROW      { return __number(); }
   1.116 +  static __number _STLP_CALL quiet_NaN() _STLP_NOTHROW     { return __number(); }
   1.117 +  static __number _STLP_CALL signaling_NaN() _STLP_NOTHROW { return __number(); }
   1.118 +  static __number _STLP_CALL denorm_min() _STLP_NOTHROW    { return __number(); }
   1.119 +
   1.120 +
   1.121 +};
   1.122 +
   1.123 +// Base class for integers.
   1.124 +
   1.125 +# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES
   1.126 +#  ifdef _STLP_LONG_LONG
   1.127 +#   define _STLP_LIMITS_MIN_TYPE _STLP_LONG_LONG
   1.128 +#   define _STLP_LIMITS_MAX_TYPE unsigned _STLP_LONG_LONG
   1.129 +#  else
   1.130 +#   define _STLP_LIMITS_MIN_TYPE long
   1.131 +#   define _STLP_LIMITS_MAX_TYPE unsigned long
   1.132 +#  endif
   1.133 +# else
   1.134 +#   define _STLP_LIMITS_MIN_TYPE _Int
   1.135 +#   define _STLP_LIMITS_MAX_TYPE _Int
   1.136 +# endif /* _STLP_LIMITED_DEFAULT_TEMPLATES */
   1.137 +
   1.138 +template <class _Int,
   1.139 +          _STLP_LIMITS_MIN_TYPE __imin,
   1.140 +          _STLP_LIMITS_MAX_TYPE __imax,
   1.141 +          int __idigits, bool __ismod>
   1.142 +class _Integer_limits : public _Numeric_limits_base<_Int> 
   1.143 +{
   1.144 +public:
   1.145 +
   1.146 +  static _Int (_STLP_CALL min) () _STLP_NOTHROW { return (_Int)__imin; }
   1.147 +  static _Int (_STLP_CALL max) () _STLP_NOTHROW { return (_Int)__imax; }
   1.148 +
   1.149 +# if defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.150 +  enum {
   1.151 +# else
   1.152 +  static const int 
   1.153 +# endif  
   1.154 +  digits = (__idigits < 0) ?
   1.155 +  ((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1))
   1.156 +  : (__idigits),
   1.157 +  digits10 = (digits * 301UL) / 1000,
   1.158 +  radix = 2
   1.159 +# if ! defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.160 +  ;
   1.161 +  static const bool
   1.162 +# else
   1.163 +  ,
   1.164 +# endif
   1.165 +  is_specialized = true,
   1.166 +  is_signed = (__imin != 0),
   1.167 +  is_integer = true,
   1.168 +  is_exact = true,
   1.169 +  is_bounded = true,
   1.170 +  is_modulo = __ismod
   1.171 +# if defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.172 +  }
   1.173 +# endif
   1.174 +  ;
   1.175 +};
   1.176 +
   1.177 +// Base class for floating-point numbers.
   1.178 +template <class __number,
   1.179 +         int __Digits, int __Digits10,
   1.180 +         int __MinExp, int __MaxExp,
   1.181 +         int __MinExp10, int __MaxExp10,
   1.182 +         bool __IsIEC559,
   1.183 +         float_round_style __RoundStyle>
   1.184 +class _Floating_limits : public _Numeric_limits_base<__number>
   1.185 +{
   1.186 +public:
   1.187 +
   1.188 +# if defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.189 +  enum {
   1.190 +# else
   1.191 +  static const int 
   1.192 +# endif  
   1.193 +
   1.194 +  digits = __Digits,
   1.195 +  digits10 = __Digits10,
   1.196 +
   1.197 +  radix = (  FLT_RADIX /* 2 */ ),
   1.198 +  min_exponent = __MinExp, 
   1.199 +  max_exponent = __MaxExp,
   1.200 +  min_exponent10 = __MinExp10,
   1.201 +  max_exponent10 = __MaxExp10
   1.202 +
   1.203 +# if defined (_STLP_STATIC_CONST_INIT_BUG)
   1.204 +  ,  
   1.205 +  has_denorm = denorm_indeterminate,
   1.206 +  round_style = __RoundStyle,
   1.207 +# else
   1.208 +  ;
   1.209 +  static const float_denorm_style has_denorm = denorm_indeterminate;
   1.210 +  static const float_round_style round_style = __RoundStyle;
   1.211 +  static const bool 
   1.212 +# endif
   1.213 +
   1.214 +  is_specialized = true,
   1.215 +  is_signed = true, 
   1.216 +
   1.217 +#if (!defined(_CRAY) || !defined(_CRAYIEEE))
   1.218 +   has_infinity     =  true,
   1.219 +   has_quiet_NaN    =  true,
   1.220 +   has_signaling_NaN=  true,
   1.221 +#else
   1.222 +  has_infinity     =  false,
   1.223 +  has_quiet_NaN    =  false,
   1.224 +  has_signaling_NaN=  false,
   1.225 +#endif
   1.226 +
   1.227 +  has_denorm_loss  =  false,
   1.228 +  is_iec559      =  __IsIEC559,
   1.229 +  is_bounded     =  true,
   1.230 +  traps          =  true,
   1.231 +  tinyness_before=  false
   1.232 +
   1.233 +# if defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.234 +  }
   1.235 +# endif
   1.236 +  ;
   1.237 +
   1.238 +};
   1.239 +
   1.240 +// Class numeric_limits
   1.241 +
   1.242 +// The unspecialized class.
   1.243 +
   1.244 +template<class _Tp> 
   1.245 +class numeric_limits : public _Numeric_limits_base<_Tp> {};
   1.246 +
   1.247 +// Specializations for all built-in integral types.
   1.248 +
   1.249 +#ifndef _STLP_NO_BOOL
   1.250 +
   1.251 +_STLP_TEMPLATE_NULL
   1.252 +class   numeric_limits<bool>
   1.253 +  : public _Integer_limits<bool, false, true, 1, false>
   1.254 +{};
   1.255 +
   1.256 +#endif /* _STLP_NO_BOOL */
   1.257 +
   1.258 +_STLP_TEMPLATE_NULL
   1.259 +class   numeric_limits<char>
   1.260 +  : public _Integer_limits<char, CHAR_MIN, CHAR_MAX, -1, true>
   1.261 +{};
   1.262 +
   1.263 +# ifndef _STLP_NO_SIGNED_BUILTINS
   1.264 +_STLP_TEMPLATE_NULL
   1.265 +class   numeric_limits<signed char>
   1.266 +  : public _Integer_limits<signed char, SCHAR_MIN, SCHAR_MAX, -1, true>
   1.267 +{};
   1.268 +# endif
   1.269 +
   1.270 +_STLP_TEMPLATE_NULL
   1.271 +class   numeric_limits<unsigned char>
   1.272 +  : public _Integer_limits<unsigned char, 0, UCHAR_MAX, -1, true>
   1.273 +{};
   1.274 +
   1.275 +#ifdef __SYMBIAN32__
   1.276 +#if !defined ( _STLP_NO_WCHAR_T )
   1.277 +_STLP_TEMPLATE_NULL
   1.278 +class   numeric_limits<wchar_t>
   1.279 +  : public _Integer_limits<wchar_t, WCHAR_MIN, WCHAR_MAX, -1, true>
   1.280 +{};
   1.281 +
   1.282 +#endif
   1.283 +#else
   1.284 +#if !(defined ( _STLP_NO_WCHAR_T ) || defined (_STLP_WCHAR_T_IS_USHORT))
   1.285 +
   1.286 +_STLP_TEMPLATE_NULL
   1.287 +class   numeric_limits<wchar_t>
   1.288 +  : public _Integer_limits<wchar_t, WCHAR_MIN, WCHAR_MAX, -1, true>
   1.289 +{};
   1.290 +#endif
   1.291 +#endif
   1.292 +
   1.293 +_STLP_TEMPLATE_NULL
   1.294 +class   numeric_limits<short>
   1.295 +  : public _Integer_limits<short, SHRT_MIN, SHRT_MAX, -1, true>
   1.296 +{};
   1.297 +
   1.298 +_STLP_TEMPLATE_NULL
   1.299 +class   numeric_limits<unsigned short>
   1.300 +  : public _Integer_limits<unsigned short, 0, USHRT_MAX, -1, true>
   1.301 +{};
   1.302 +
   1.303 +# if defined (__xlC__) && (__xlC__ == 0x500)
   1.304 +#  undef INT_MIN
   1.305 +#  define INT_MIN -2147483648
   1.306 +# endif
   1.307 +
   1.308 +
   1.309 +_STLP_TEMPLATE_NULL
   1.310 +class   numeric_limits<int>
   1.311 +  : public _Integer_limits<int, INT_MIN, INT_MAX, -1, true>
   1.312 +{};
   1.313 +
   1.314 +_STLP_TEMPLATE_NULL
   1.315 +class   numeric_limits<unsigned int>
   1.316 +  : public _Integer_limits<unsigned int, 0, UINT_MAX, -1, true>
   1.317 +{};
   1.318 +
   1.319 +_STLP_TEMPLATE_NULL
   1.320 +class   numeric_limits<long>
   1.321 +  : public _Integer_limits<long, LONG_MIN, LONG_MAX, -1, true>
   1.322 +{};
   1.323 +
   1.324 +_STLP_TEMPLATE_NULL
   1.325 +class   numeric_limits<unsigned long>
   1.326 +  : public _Integer_limits<unsigned long, 0, ULONG_MAX, -1, true>
   1.327 +{};
   1.328 +
   1.329 +#ifdef _STLP_LONG_LONG
   1.330 +
   1.331 +# if defined (_STLP_MSVC) || defined (__BORLANDC__)
   1.332 +
   1.333 +#    define LONGLONG_MAX     0x7fffffffffffffffi64
   1.334 +#    define LONGLONG_MIN     (-LONGLONG_MAX-1i64)
   1.335 +#    define ULONGLONG_MAX    0xffffffffffffffffUi64
   1.336 +
   1.337 +# else
   1.338 +
   1.339 +#  ifndef   LONGLONG_MAX
   1.340 +#    define LONGLONG_MAX     0x7fffffffffffffffLL
   1.341 +#  endif
   1.342 +#  ifndef   LONGLONG_MIN
   1.343 +#    define LONGLONG_MIN     (-LONGLONG_MAX-1LL)
   1.344 +#  endif
   1.345 +#  ifndef   ULONGLONG_MAX
   1.346 +#    define ULONGLONG_MAX    0xffffffffffffffffULL
   1.347 +#  endif
   1.348 +
   1.349 +# endif
   1.350 +
   1.351 +#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ <= 96)
   1.352 +
   1.353 +_STLP_TEMPLATE_NULL
   1.354 +class   numeric_limits<_STLP_LONG_LONG>
   1.355 +  : public _Integer_limits<_STLP_LONG_LONG, LONGLONG_MIN, LONGLONG_MAX, -1, true>
   1.356 +{};
   1.357 +
   1.358 +_STLP_TEMPLATE_NULL
   1.359 +class   numeric_limits<unsigned _STLP_LONG_LONG>
   1.360 +  : public _Integer_limits<unsigned _STLP_LONG_LONG, 0, ULONGLONG_MAX, -1, true>
   1.361 +{};
   1.362 +#else /* gcc 2.97 (after 2000-11-01), 2.98, 3.0 */
   1.363 +/*
   1.364 + newest gcc has new mangling scheme, that has problem
   1.365 + with generating name [instantiated] of template specialization like
   1.366 + _Integer_limits<_STLP_LONG_LONG, LONGLONG_MIN, LONGLONG_MAX, -1, true>
   1.367 +                                  ~~~~~~~~~~~~  ~~~~~~~~~~~~
   1.368 + Below is code that solve this problem.
   1.369 +   - ptr
   1.370 + */
   1.371 +_STLP_TEMPLATE_NULL
   1.372 +class   numeric_limits<_STLP_LONG_LONG>
   1.373 +  : public _Numeric_limits_base<_STLP_LONG_LONG> 
   1.374 +{
   1.375 +public:
   1.376 +
   1.377 +  static _STLP_LONG_LONG (_STLP_CALL min) () _STLP_NOTHROW { return LONGLONG_MIN; }
   1.378 +  static _STLP_LONG_LONG (_STLP_CALL max) () _STLP_NOTHROW { return LONGLONG_MAX; }
   1.379 +
   1.380 +# if defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.381 +  enum {
   1.382 +# else
   1.383 +  static const int 
   1.384 +# endif  
   1.385 +  digits = ((int)((sizeof(_STLP_LONG_LONG) * (CHAR_BIT))) - 1),
   1.386 +  digits10 = (digits * 301UL) / 1000,
   1.387 +  radix = 2
   1.388 +# if ! defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.389 +  ;
   1.390 +  static const bool
   1.391 +# else
   1.392 +  ,
   1.393 +# endif
   1.394 +  is_specialized = true,
   1.395 +  is_signed = true,
   1.396 +  is_integer = true,
   1.397 +  is_exact = true,
   1.398 +  is_bounded = true,
   1.399 +  is_modulo = true
   1.400 +# if defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.401 +  }
   1.402 +# endif
   1.403 +  ;
   1.404 +};
   1.405 +
   1.406 +_STLP_TEMPLATE_NULL
   1.407 +class   numeric_limits<unsigned _STLP_LONG_LONG>
   1.408 +  : public _Numeric_limits_base<unsigned _STLP_LONG_LONG> 
   1.409 +{
   1.410 +public:
   1.411 +
   1.412 +  static unsigned _STLP_LONG_LONG (_STLP_CALL min) () _STLP_NOTHROW { return 0ULL; }
   1.413 +  static unsigned _STLP_LONG_LONG (_STLP_CALL max) () _STLP_NOTHROW { return ULONGLONG_MAX; }
   1.414 +
   1.415 +# if defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.416 +  enum {
   1.417 +# else
   1.418 +  static const int 
   1.419 +# endif  
   1.420 +  digits = ((int)((sizeof(unsigned _STLP_LONG_LONG) * (CHAR_BIT)))),
   1.421 +  digits10 = (digits * 301UL) / 1000,
   1.422 +  radix = 2
   1.423 +# if ! defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.424 +  ;
   1.425 +  static const bool
   1.426 +# else
   1.427 +  ,
   1.428 +# endif
   1.429 +  is_specialized = true,
   1.430 +  is_signed = false,
   1.431 +  is_integer = true,
   1.432 +  is_exact = true,
   1.433 +  is_bounded = true,
   1.434 +  is_modulo = true
   1.435 +# if defined ( _STLP_STATIC_CONST_INIT_BUG)
   1.436 +  }
   1.437 +# endif
   1.438 +  ;
   1.439 +};
   1.440 +
   1.441 +# endif /* __GNUC__ > 2000-11-01 */
   1.442 +
   1.443 +#endif /* _STLP_LONG_LONG */
   1.444 +
   1.445 +// Specializations for all built-in floating-point types.
   1.446 +
   1.447 +union _F_rep
   1.448 +{
   1.449 +  unsigned short rep[2];
   1.450 +  float val;
   1.451 +};
   1.452 +union _D_rep
   1.453 +{
   1.454 +  unsigned short rep[4];
   1.455 +  double val;
   1.456 +};
   1.457 +
   1.458 +# ifndef _STLP_NO_LONG_DOUBLE
   1.459 +union _L_rep
   1.460 +{
   1.461 +  unsigned short rep[8];
   1.462 +  long double val;
   1.463 +};
   1.464 +# endif
   1.465 +
   1.466 +template <class __dummy>
   1.467 +class _LimG 
   1.468 +{
   1.469 +public:  
   1.470 +  static const _F_rep _F_inf;
   1.471 +  static const _F_rep _F_qNaN;
   1.472 +  static const _F_rep _F_sNaN;
   1.473 +  static const _D_rep _D_inf;
   1.474 +  static const _D_rep _D_qNaN;
   1.475 +  static const _D_rep _D_sNaN;
   1.476 +  
   1.477 +# ifndef _STLP_NO_LONG_DOUBLE
   1.478 +  static const _L_rep _L_inf;
   1.479 +  static const _L_rep _L_qNaN;
   1.480 +  static const _L_rep _L_sNaN;
   1.481 +# endif
   1.482 +};
   1.483 +
   1.484 +# if defined (_STLP_USE_TEMPLATE_EXPORT) 
   1.485 +_STLP_EXPORT_TEMPLATE_CLASS _LimG<bool>;
   1.486 +# endif
   1.487 +
   1.488 +_STLP_TEMPLATE_NULL class   numeric_limits<float>
   1.489 +  : public _Floating_limits<float, 
   1.490 +                            FLT_MANT_DIG,   // Binary digits of precision
   1.491 +                            FLT_DIG,        // Decimal digits of precision
   1.492 +                            FLT_MIN_EXP,    // Minimum exponent
   1.493 +                            FLT_MAX_EXP,    // Maximum exponent
   1.494 +                            FLT_MIN_10_EXP, // Minimum base 10 exponent
   1.495 +                            FLT_MAX_10_EXP, // Maximum base 10 exponent
   1.496 +                            true,           // conforms to iec559
   1.497 +                            round_to_nearest>
   1.498 +{
   1.499 +public:
   1.500 +  static float (_STLP_CALL min) () _STLP_NOTHROW { return FLT_MIN; }
   1.501 +  static float _STLP_CALL denorm_min() _STLP_NOTHROW { return FLT_MIN; }
   1.502 +  static float (_STLP_CALL max) () _STLP_NOTHROW { _STLP_USING_VENDOR_CSTD return FLT_MAX; }
   1.503 +  static float _STLP_CALL epsilon() _STLP_NOTHROW { return FLT_EPSILON; }
   1.504 +  static float _STLP_CALL round_error() _STLP_NOTHROW { return 0.5f; } // Units: ulps.
   1.505 +  static  float _STLP_CALL infinity() { return _LimG<bool>::_F_inf.val; }
   1.506 +  static  float _STLP_CALL quiet_NaN() { return _LimG<bool>::_F_qNaN.val; }
   1.507 +  static  float _STLP_CALL signaling_NaN() { return _LimG<bool>::_F_sNaN.val; }
   1.508 +};
   1.509 +
   1.510 +_STLP_TEMPLATE_NULL class   numeric_limits<double>
   1.511 +  : public _Floating_limits<double, 
   1.512 +                            DBL_MANT_DIG,   // Binary digits of precision
   1.513 +                            DBL_DIG,        // Decimal digits of precision
   1.514 +                            DBL_MIN_EXP,    // Minimum exponent
   1.515 +                            DBL_MAX_EXP,    // Maximum exponent
   1.516 +                            DBL_MIN_10_EXP, // Minimum base 10 exponent
   1.517 +                            DBL_MAX_10_EXP, // Maximum base 10 exponent
   1.518 +                            true,           // conforms to iec559
   1.519 +                            round_to_nearest>
   1.520 +{
   1.521 +public:
   1.522 +  static double (_STLP_CALL min)() _STLP_NOTHROW { return DBL_MIN; }
   1.523 +  static double _STLP_CALL denorm_min() _STLP_NOTHROW { return DBL_MIN; }
   1.524 +  static double (_STLP_CALL max)() _STLP_NOTHROW { _STLP_USING_VENDOR_CSTD return DBL_MAX; }
   1.525 +  static double _STLP_CALL epsilon() _STLP_NOTHROW { return DBL_EPSILON; }
   1.526 +  static double _STLP_CALL round_error() _STLP_NOTHROW { return 0.5; } // Units: ulps.
   1.527 +  static  double _STLP_CALL infinity() { return _LimG<bool>::_D_inf.val; }
   1.528 +  static  double _STLP_CALL quiet_NaN(){ return _LimG<bool>::_D_qNaN.val; }
   1.529 +  static  double _STLP_CALL signaling_NaN() { return _LimG<bool>::_D_sNaN.val; }
   1.530 +};
   1.531 +
   1.532 +# ifndef _STLP_NO_LONG_DOUBLE
   1.533 +
   1.534 +_STLP_TEMPLATE_NULL 
   1.535 +class   numeric_limits<long double>
   1.536 +  : public _Floating_limits<long double, 
   1.537 +                            LDBL_MANT_DIG,  // Binary digits of precision
   1.538 +                            LDBL_DIG,       // Decimal digits of precision
   1.539 +                            LDBL_MIN_EXP,   // Minimum exponent
   1.540 +                            LDBL_MAX_EXP,   // Maximum exponent
   1.541 +                            LDBL_MIN_10_EXP,// Minimum base 10 exponent
   1.542 +                            LDBL_MAX_10_EXP,// Maximum base 10 exponent
   1.543 +                            false,          // Doesn't conform to iec559
   1.544 +                            round_to_nearest>
   1.545 +{
   1.546 +public:
   1.547 +  static long double (_STLP_CALL min) () _STLP_NOTHROW { _STLP_USING_VENDOR_CSTD return LDBL_MIN; }
   1.548 +  static long double _STLP_CALL denorm_min() _STLP_NOTHROW { _STLP_USING_VENDOR_CSTD return LDBL_MIN; }
   1.549 +  static long double (_STLP_CALL max) () _STLP_NOTHROW { _STLP_USING_VENDOR_CSTD return LDBL_MAX; }
   1.550 +  static long double _STLP_CALL epsilon() _STLP_NOTHROW { return LDBL_EPSILON; }
   1.551 +  static long double _STLP_CALL round_error() _STLP_NOTHROW { return 4; } // Units: ulps.
   1.552 +  static long double _STLP_CALL infinity() { return _LimG<bool>::_L_inf.val; } 
   1.553 +  static long double _STLP_CALL quiet_NaN() { return _LimG<bool>::_L_qNaN.val; }
   1.554 +  static long double _STLP_CALL signaling_NaN() { return _LimG<bool>::_L_sNaN.val; }
   1.555 +};
   1.556 +
   1.557 +# endif
   1.558 +
   1.559 +// We write special values (Inf and NaN) as bit patterns and 
   1.560 +// cast the the appropriate floating-point types. 
   1.561 +_STLP_END_NAMESPACE
   1.562 +
   1.563 +# if !defined (_STLP_LINK_TIME_INSTANTIATION)
   1.564 +#  include <stl/_limits.c>
   1.565 +# endif
   1.566 +
   1.567 +#endif
   1.568 +
   1.569 +// Local Variables:
   1.570 +// mode:C++
   1.571 +// End: