imgtools/imglib/boostlibrary/boost/integer_traits.hpp
author Mike Kinghan <mikek@symbian.org>
Wed, 01 Dec 2010 12:02:41 +0000
changeset 42 cf609178ac39
parent 2 39c28ec933dd
permissions -rwxr-xr-x
1) fix_tools_exports.pl need only be run on Windows hosts; was run unnecessarily on Linux too. 2) Need to export modload.pm on Linux as well as Windows hosts.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     1
/* boost integer_traits.hpp header file
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     2
 *
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     3
 * Copyright Jens Maurer 2000
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     4
 * Distributed under the Boost Software License, Version 1.0. (See
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     5
 * accompanying file LICENSE_1_0.txt or copy at
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     6
 * http://www.boost.org/LICENSE_1_0.txt)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     7
 *
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     8
 * $Id: integer_traits.hpp 32576 2006-02-05 10:19:42Z johnmaddock $
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
     9
 *
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    10
 * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    11
 */
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    12
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    13
//  See http://www.boost.org/libs/integer for documentation.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    14
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    15
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    16
#ifndef BOOST_INTEGER_TRAITS_HPP
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    17
#define BOOST_INTEGER_TRAITS_HPP
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    18
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    19
#include <boost/config.hpp>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    20
#include <boost/limits.hpp>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    21
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    22
// These are an implementation detail and not part of the interface
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    23
#include <limits.h>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    24
// we need wchar.h for WCHAR_MAX/MIN but not all platforms provide it,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    25
// and some may have <wchar.h> but not <cwchar> ...
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    26
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    27
#include <wchar.h>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    28
#endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    29
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    30
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    31
namespace boost {
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    32
template<class T>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    33
class integer_traits : public std::numeric_limits<T>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    34
{
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    35
public:
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    36
  BOOST_STATIC_CONSTANT(bool, is_integral = false);
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    37
};
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    38
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    39
namespace detail {
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    40
template<class T, T min_val, T max_val>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    41
class integer_traits_base
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    42
{
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    43
public:
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    44
  BOOST_STATIC_CONSTANT(bool, is_integral = true);
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    45
  BOOST_STATIC_CONSTANT(T, const_min = min_val);
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    46
  BOOST_STATIC_CONSTANT(T, const_max = max_val);
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    47
};
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    48
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    49
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    50
//  A definition is required even for integral static constants
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    51
template<class T, T min_val, T max_val>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    52
const bool integer_traits_base<T, min_val, max_val>::is_integral;
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    53
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    54
template<class T, T min_val, T max_val>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    55
const T integer_traits_base<T, min_val, max_val>::const_min;
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    56
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    57
template<class T, T min_val, T max_val>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    58
const T integer_traits_base<T, min_val, max_val>::const_max;
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    59
#endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    60
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    61
} // namespace detail
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    62
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    63
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    64
class integer_traits<bool>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    65
  : public std::numeric_limits<bool>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    66
    public detail::integer_traits_base<bool, false, true>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    67
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    68
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    69
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    70
class integer_traits<char>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    71
  : public std::numeric_limits<char>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    72
    public detail::integer_traits_base<char, CHAR_MIN, CHAR_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    73
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    74
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    75
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    76
class integer_traits<signed char>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    77
  : public std::numeric_limits<signed char>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    78
    public detail::integer_traits_base<signed char, SCHAR_MIN, SCHAR_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    79
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    80
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    81
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    82
class integer_traits<unsigned char>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    83
  : public std::numeric_limits<unsigned char>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    84
    public detail::integer_traits_base<unsigned char, 0, UCHAR_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    85
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    86
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    87
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    88
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    89
class integer_traits<wchar_t>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    90
  : public std::numeric_limits<wchar_t>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    91
    // Don't trust WCHAR_MIN and WCHAR_MAX with Mac OS X's native
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    92
    // library: they are wrong!
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    93
#if defined(WCHAR_MIN) && defined(WCHAR_MAX) && !defined(__APPLE__)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    94
    public detail::integer_traits_base<wchar_t, WCHAR_MIN, WCHAR_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    95
#elif defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    96
    // No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned:
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    97
    public detail::integer_traits_base<wchar_t, 0, 0xffff>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    98
#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400))\
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
    99
    || (defined __APPLE__)\
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   100
    || (defined(__OpenBSD__) && defined(__GNUC__))\
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   101
    || (defined(__NetBSD__) && defined(__GNUC__))\
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   102
    || (defined(__FreeBSD__) && defined(__GNUC__))\
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   103
    || (defined(__DragonFly__) && defined(__GNUC__))\
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   104
    || (defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 3) && !defined(__SGI_STL_PORT))
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   105
    // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as int.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   106
    //  - SGI MIPSpro with native library
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   107
    //  - gcc 3.x on HP-UX
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   108
    //  - Mac OS X with native library
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   109
    //  - gcc on FreeBSD, OpenBSD and NetBSD
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   110
    public detail::integer_traits_base<wchar_t, INT_MIN, INT_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   111
#elif defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 2) && !defined(__SGI_STL_PORT)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   112
    // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as unsigned int.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   113
    //  - gcc 2.95.x on HP-UX
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   114
    // (also, std::numeric_limits<wchar_t> appears to return the wrong values).
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   115
    public detail::integer_traits_base<wchar_t, 0, UINT_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   116
#else
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   117
#error No WCHAR_MIN and WCHAR_MAX present, please adjust integer_traits<> for your compiler.
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   118
#endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   119
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   120
#endif // BOOST_NO_INTRINSIC_WCHAR_T
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   121
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   122
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   123
class integer_traits<short>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   124
  : public std::numeric_limits<short>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   125
    public detail::integer_traits_base<short, SHRT_MIN, SHRT_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   126
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   127
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   128
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   129
class integer_traits<unsigned short>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   130
  : public std::numeric_limits<unsigned short>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   131
    public detail::integer_traits_base<unsigned short, 0, USHRT_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   132
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   133
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   134
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   135
class integer_traits<int>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   136
  : public std::numeric_limits<int>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   137
    public detail::integer_traits_base<int, INT_MIN, INT_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   138
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   139
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   140
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   141
class integer_traits<unsigned int>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   142
  : public std::numeric_limits<unsigned int>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   143
    public detail::integer_traits_base<unsigned int, 0, UINT_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   144
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   145
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   146
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   147
class integer_traits<long>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   148
  : public std::numeric_limits<long>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   149
    public detail::integer_traits_base<long, LONG_MIN, LONG_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   150
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   151
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   152
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   153
class integer_traits<unsigned long>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   154
  : public std::numeric_limits<unsigned long>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   155
    public detail::integer_traits_base<unsigned long, 0, ULONG_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   156
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   157
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   158
#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   159
#if defined(ULLONG_MAX) && defined(BOOST_HAS_LONG_LONG)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   160
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   161
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   162
class integer_traits< ::boost::long_long_type>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   163
  : public std::numeric_limits< ::boost::long_long_type>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   164
    public detail::integer_traits_base< ::boost::long_long_type, LLONG_MIN, LLONG_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   165
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   166
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   167
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   168
class integer_traits< ::boost::ulong_long_type>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   169
  : public std::numeric_limits< ::boost::ulong_long_type>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   170
    public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULLONG_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   171
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   172
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   173
#elif defined(ULONG_LONG_MAX) && defined(BOOST_HAS_LONG_LONG)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   174
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   175
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   176
class integer_traits< ::boost::long_long_type>  : public std::numeric_limits< ::boost::long_long_type>,    public detail::integer_traits_base< ::boost::long_long_type, LONG_LONG_MIN, LONG_LONG_MAX>{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   177
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   178
class integer_traits< ::boost::ulong_long_type>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   179
  : public std::numeric_limits< ::boost::ulong_long_type>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   180
    public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONG_LONG_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   181
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   182
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   183
#elif defined(ULONGLONG_MAX) && defined(BOOST_HAS_LONG_LONG)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   184
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   185
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   186
class integer_traits< ::boost::long_long_type>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   187
  : public std::numeric_limits< ::boost::long_long_type>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   188
    public detail::integer_traits_base< ::boost::long_long_type, LONGLONG_MIN, LONGLONG_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   189
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   190
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   191
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   192
class integer_traits< ::boost::ulong_long_type>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   193
  : public std::numeric_limits< ::boost::ulong_long_type>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   194
    public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONGLONG_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   195
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   196
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   197
#elif defined(_LLONG_MAX) && defined(_C2) && defined(BOOST_HAS_LONG_LONG)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   198
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   199
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   200
class integer_traits< ::boost::long_long_type>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   201
  : public std::numeric_limits< ::boost::long_long_type>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   202
    public detail::integer_traits_base< ::boost::long_long_type, -_LLONG_MAX - _C2, _LLONG_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   203
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   204
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   205
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   206
class integer_traits< ::boost::ulong_long_type>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   207
  : public std::numeric_limits< ::boost::ulong_long_type>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   208
    public detail::integer_traits_base< ::boost::ulong_long_type, 0, _ULLONG_MAX>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   209
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   210
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   211
#elif defined(BOOST_HAS_LONG_LONG)
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   212
//
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   213
// we have long long but no constants, this happens for example with gcc in -ansi mode,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   214
// we'll just have to work out the values for ourselves (assumes 2's compliment representation):
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   215
//
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   216
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   217
class integer_traits< ::boost::long_long_type>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   218
  : public std::numeric_limits< ::boost::long_long_type>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   219
    public detail::integer_traits_base< ::boost::long_long_type, (1LL << (sizeof(::boost::long_long_type) - 1)), ~(1LL << (sizeof(::boost::long_long_type) - 1))>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   220
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   221
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   222
template<>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   223
class integer_traits< ::boost::ulong_long_type>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   224
  : public std::numeric_limits< ::boost::ulong_long_type>,
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   225
    public detail::integer_traits_base< ::boost::ulong_long_type, 0, ~0uLL>
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   226
{ };
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   227
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   228
#endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   229
#endif
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   230
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   231
} // namespace boost
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   232
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   233
#endif /* BOOST_INTEGER_TRAITS_HPP */
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   234
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   235
39c28ec933dd Removing all prior files. Adding a complete branch of the 'build' package with fixes
mikek
parents:
diff changeset
   236