Compare commits

...

19 Commits

Author SHA1 Message Date
75c55bbe81 This commit was manufactured by cvs2svn to create tag
'Version_1_26_0'.

[SVN r11842]
2001-11-30 18:24:42 +00:00
24e6bfbfaa add definition for integral constants initialized in-class
[SVN r11724]
2001-11-18 17:37:21 +00:00
ccabb522d0 Remove non-ASCII character that crept in.
[SVN r11570]
2001-11-04 21:53:21 +00:00
0995d0a6fb only use "long long" if there's a stdlib overload
[SVN r11516]
2001-11-01 21:52:08 +00:00
5ec8116c34 use BOOST_HAS_LONG_LONG
[SVN r11493]
2001-10-31 19:35:59 +00:00
4a094c4bcb fix wchar_t on HP-UX with gcc
[SVN r11472]
2001-10-30 20:55:18 +00:00
a7d2da8d1c 1.25.0 Final runup
[SVN r11315]
2001-10-01 15:54:23 +00:00
4d2a921dbf Write out limits as integers, even for char types.
[SVN r11301]
2001-09-28 17:38:10 +00:00
0c758855e4 Since it's obsolete, it should be removed.
[SVN r11300]
2001-09-28 17:37:25 +00:00
3399df597e Add case for Mac OS X to the WCHAR_MIN/WCHAR_MAX section.
[SVN r11242]
2001-09-24 23:45:49 +00:00
a066e242b0 always use WCHAR_MIN and WCHAR_MAX if defined
[SVN r11232]
2001-09-24 18:43:20 +00:00
a635f753a4 port cstdint.hpp to HP-UX
[SVN r11175]
2001-09-20 19:25:35 +00:00
08f30ea46c moved check, because different unsigned types may have different
representations for -1 (e.g. (unsigned char)-1 and (unsigned int)-1)


[SVN r11174]
2001-09-20 19:24:34 +00:00
292eeb5c90 Fixes for broken using declarations
[SVN r11164]
2001-09-20 11:44:34 +00:00
8a105dab3f Fixes for the case that platform has its own stdint.h (less stringent tests)
[SVN r11163]
2001-09-20 11:44:05 +00:00
5b0d514aa4 commit of split-config, including any changes required to existing libraries (mainly regex).
[SVN r11138]
2001-09-18 11:13:39 +00:00
eee6dfa4d9 avoid "long long" with SunCC (Gennadiy E. Rozental)
[SVN r11066]
2001-09-07 18:49:12 +00:00
3bd242ef49 Fix broken hyperlink
[SVN r10896]
2001-08-19 15:08:33 +00:00
3db9390efb Add LL suffix to line 150 for long longs at suggestion of Toon Knapen
[SVN r10854]
2001-08-13 17:02:48 +00:00
8 changed files with 72 additions and 324 deletions

View File

@ -69,7 +69,7 @@ representing any value of any signed integer type.</p>
capable of representing any value of any unsigned integer type.</p>
<p>These types are required.</p>
<hr>
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan -->10 Feb 2001<!--webbot bot="Timestamp" endspan i-checksum="14373" -->
<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %b %Y" startspan -->19 Aug 2001<!--webbot bot="Timestamp" endspan i-checksum="14767" -->
</p>
<p>&nbsp;</p>

View File

@ -9,21 +9,12 @@
// See http://www.boost.org for most recent version including documentation.
// Revision History
// 11 Sep 01 Adapted to work with macros defined in native stdint.h (John Maddock)
// 12 Nov 00 Adapted to merged <boost/cstdint.hpp>
// 23 Sep 00 Added INTXX_C constant macro support + int64_t support (John Maddock).
// 28 Jun 00 Initial version
#include <cassert>
#include <iostream>
#include <boost/cstdint.hpp>
//
// macros should not be defined by default:
//
#ifdef INT8_C
#error header incorrectly implemented
#endif
//
// now define the macros:
//
#define __STDC_CONSTANT_MACROS
#include <boost/cstdint.hpp>
@ -108,10 +99,17 @@ void integral_constant_type_check(T1, T2)
// numeric_limits implementations currently
// vary too much, or are incomplete or missing.
//
assert(sizeof(T1) == sizeof(T2));
T1 t1 = -1;
T2 t2 = -1;
#if defined(BOOST_HAS_STDINT_H)
// if we have a native stdint.h
// then the INTXX_C macros may define
// a type that's wider than required:
assert(sizeof(T1) <= sizeof(T2));
#else
assert(sizeof(T1) == sizeof(T2));
assert(t1 == t2);
#endif
if(t1 >= 0)
assert(t2 >= 0);
else
@ -216,12 +214,4 @@ int main()
return 0;
}
//
// now verify that constant macros get undef'ed correctly:
//
#undef __STDC_CONSTANT_MACROS
#include <boost/cstdint.hpp>
#ifdef INT8_C
#error boost/cstdint.hpp not correctly defined
#endif

View File

@ -9,6 +9,7 @@
// See http://www.boost.org for most recent version including documentation.
// Revision History
// 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.)
// 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer)
// 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer)
// 12 Nov 00 Merged <boost/stdint.h> (Jens Maurer)
@ -24,12 +25,12 @@
#include <boost/config.hpp>
#ifdef BOOST_SYSTEM_HAS_STDINT_H
#ifdef BOOST_HAS_STDINT_H
// The following #include is an implementation artifact; not part of interface.
# ifdef __hpux
// HP-UX has a nice <stdint.h> in a non-standard location
# include <sys/_inttypes.h>
// HP-UX has a vaguely nice <stdint.h> in a non-standard location
# include <inttypes.h>
# ifdef __STDC_32_MODE__
// this is triggered with GCC, because it defines __cplusplus < 199707L
# define BOOST_NO_INT64_T
@ -79,7 +80,7 @@ namespace boost
} // namespace boost
#else // BOOST_SYSTEM_HAS_STDINT_H
#else // BOOST_HAS_STDINT_H
# include <limits.h> // implementation artifact; not part of interface
@ -144,11 +145,18 @@ namespace boost
// 64-bit types + intmax_t and uintmax_t ----------------------------------//
# if !defined(BOOST_MSVC) && !defined(__BORLANDC__) && \
# if defined(BOOST_HAS_LONG_LONG) && \
!defined(BOOST_MSVC) && !defined(__BORLANDC__) && \
(!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \
(defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
# if (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615U) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615U) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615U)
# if defined(__hpux)
// HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL)
// 2**64 - 1
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
typedef long long intmax_t;
typedef unsigned long long uintmax_t;
typedef long long int64_t;
@ -157,9 +165,7 @@ namespace boost
typedef unsigned long long uint64_t;
typedef unsigned long long uint_least64_t;
typedef unsigned long long uint_fast64_t;
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
# elif ULONG_MAX != 0xffffffff
# if ULONG_MAX == 18446744073709551615 // 2**64 - 1
@ -195,7 +201,7 @@ namespace boost
} // namespace boost
#endif // BOOST_SYSTEM_HAS_STDINT_H
#endif // BOOST_HAS_STDINT_H
#endif // BOOST_CSTDINT_HPP
@ -210,11 +216,13 @@ __STDC_CONSTANT_MACROS is defined.
Undefine the macros if __STDC_CONSTANT_MACROS is
not defined and the macros are (cf <cassert>).
Added 23rd September (John Maddock).
Added 23rd September 2000 (John Maddock).
Modified 11th September 2001 to be excluded when
BOOST_HAS_STDINT_H is defined (John Maddock).
******************************************************/
#if defined(__STDC_CONSTANT_MACROS) && !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED)
#if defined(__STDC_CONSTANT_MACROS) && !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(BOOST_HAS_STDINT_H)
# define BOOST__STDC_CONSTANT_MACROS_DEFINED
# if (defined(BOOST_MSVC) && (BOOST_MSVC >= 1100)) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x520))
//
@ -265,16 +273,20 @@ Added 23rd September (John Maddock).
// 64-bit types + intmax_t and uintmax_t ----------------------------------//
# if defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)
# if defined(BOOST_HAS_LONG_LONG) && \
(defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
# if defined(__hpux)
// HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
# if (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615U) || \
(defined(ULONG_LONG_MAX) && (defined(__hpux) || ULONG_LONG_MAX == 18446744073709551615U)) || \
# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615U) || \
(defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615U) || \
(defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615U)
# define INT64_C(value) value##LL
# define UINT64_C(value) value##uLL
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
# define INT64_C(value) value##LL
# define UINT64_C(value) value##uLL
# elif ULONG_MAX != 0xffffffff
# if ULONG_MAX == 18446744073709551615 // 2**64 - 1
@ -296,7 +308,7 @@ Added 23rd September (John Maddock).
# endif // Borland/Microsoft specific width suffixes
#elif defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(__STDC_CONSTANT_MACROS)
#elif defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(__STDC_CONSTANT_MACROS) && !defined(BOOST_HAS_STDINT_H)
//
// undef all the macros:
//

View File

@ -23,7 +23,7 @@
// These are an implementation detail and not part of the interface
#include <limits.h>
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && !defined(BOOST_NO_CWCHAR)
#include <wchar.h>
#endif
@ -47,7 +47,10 @@ public:
};
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
// The definition is required even for integral static constants
// A definition is required even for integral static constants
template<class T, T min_val, T max_val>
const bool integer_traits_base<T, min_val, max_val>::is_integral;
template<class T, T min_val, T max_val>
const T integer_traits_base<T, min_val, max_val>::const_min;
@ -85,18 +88,24 @@ class integer_traits<unsigned char>
template<>
class integer_traits<wchar_t>
: public std::numeric_limits<wchar_t>,
#if defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__))
#if defined(WCHAR_MIN) && defined(WCHAR_MAX)
public detail::integer_traits_base<wchar_t, WCHAR_MIN, WCHAR_MAX>
#elif defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__))
// No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned:
public detail::integer_traits_base<wchar_t, 0, 0xffff>
#elif defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400)
// SGI MIPSpro with native library doesn't have them, either
#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400)) || (defined __APPLE__) || (defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 3) && !defined(__SGI_STL_PORT))
// No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as int.
// - SGI MIPSpro with native library
// - gcc 3.x on HP-UX
// - Mac OS X with native library
public detail::integer_traits_base<wchar_t, INT_MIN, INT_MAX>
#elif defined(__hpux) && defined(__GNUC__) && !defined(__SGI_STL_PORT)
// GCC 2.95.2 doesn't have them on HP-UX, either
// (also, std::numeric_limits<wchar_t> appears to return the wrong values)
#elif defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 2) && !defined(__SGI_STL_PORT)
// No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as unsigned int.
// - gcc 2.95.x on HP-UX
// (also, std::numeric_limits<wchar_t> appears to return the wrong values).
public detail::integer_traits_base<wchar_t, 0, UINT_MAX>
#else
public detail::integer_traits_base<wchar_t, WCHAR_MIN, WCHAR_MAX>
#error No WCHAR_MIN and WCHAR_MAX present, please adjust integer_traits<> for your compiler.
#endif
{ };
#endif // BOOST_NO_INTRINSIC_WCHAR_T
@ -137,7 +146,7 @@ class integer_traits<unsigned long>
public detail::integer_traits_base<unsigned long, 0, ULONG_MAX>
{ };
#ifdef ULLONG_MAX
#if defined(ULLONG_MAX) && !defined(__SUNPRO_CC)
template<>
class integer_traits<long long>
: public std::numeric_limits<long long>,

View File

@ -1,272 +0,0 @@
// boost stdint.h header file ---------------------------------------------//
// (C) Copyright boost.org 1999. Permission to copy, use, modify, sell
// and distribute this software is granted provided this copyright
// notice appears in all copies. This software is provided "as is" without
// express or implied warranty, and with no claim as to its suitability for
// any purpose.
// See http://www.boost.org for most recent version including documentation.
// NOTE WELL: This is an implementation of the ISO C Standard (1999) stdint.h
// header. C++ programs are advised to use <boost/cstdint.hpp> rather than
// this header.
// NOTE OF OBSOLESCENCE: In general, this header file cannot detect
// whether the current translation unit somewhere includes ISO C99
// <stdint.h> or not. For example, in case BOOST_SYSTEM_HAS_STDINT_H
// is not defined and ISO C99 <stdint.h> has been included before,
// this file will re-define ISO C99 reserved file-scope identifiers
// such as int8_t (see ISO C99 7.1.3 and 7.18). Defining the macro
// BOOST_SYSTEM_HAS_STDINT_H is not sufficient in general, in
// particular if a partly conformant <stdint.h> header is available
// on the platform, e.g. Comeau C++ with GNU glibc 2.1.2.
//
// In order to avoid incompatibilities with ISO C99, this header
// should not be used at all, and it may be deleted in the future.
// C++ programs which require ISO C99 <stdint.h> functionality are
// strongly advised to use <boost/cstdint.hpp> instead, which
// provides <stdint.h> names in namespace boost, e.g. boost::int8_t.
// Revision History
// 12 Nov 00 obsoleted (Jens Maurer)
// 23 Sep 00 INTXX_C support added (John Maddock)
// 22 Sep 00 64-bit support for Borland & Microsoft compilers (John Maddock)
// 8 Aug 99 Initial version (Beman Dawes)
#ifndef BOOST_STDINT_H
#define BOOST_STDINT_H
#include <boost/config.hpp>
#ifdef BOOST_SYSTEM_HAS_STDINT_H
#include <stdint.h>
#else
#include <limits.h> // implementation artifact; not part of interface
// These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit
// platforms. For other systems, they will have to be hand tailored.
//
// Because the fast types are assumed to be the same as the undecorated types,
// it may be possible to hand tailor a more efficient implementation. Such
// an optimization may be illusionary; on the Intel x86-family 386 on, for
// example, byte arithmetic and load/stores are as fast as "int" sized ones.
// 8-bit types -------------------------------------------------------------//
# if UCHAR_MAX == 0xff
typedef signed char int8_t;
typedef signed char int_least8_t;
typedef signed char int_fast8_t;
typedef unsigned char uint8_t;
typedef unsigned char uint_least8_t;
typedef unsigned char uint_fast8_t;
# else
# error defaults not correct; you must hand modify boost/stdint.h
# endif
// 16-bit types ------------------------------------------------------------//
# if USHRT_MAX == 0xffff
typedef short int16_t;
typedef short int_least16_t;
typedef short int_fast16_t;
typedef unsigned short uint16_t;
typedef unsigned short uint_least16_t;
typedef unsigned short uint_fast16_t;
# else
# error defaults not correct; you must hand modify boost/stdint.h
# endif
// 32-bit types ------------------------------------------------------------//
# if UINT_MAX == 0xffffffff
typedef int int32_t;
typedef int int_least32_t;
typedef int int_fast32_t;
typedef unsigned int uint32_t;
typedef unsigned int uint_least32_t;
typedef unsigned int uint_fast32_t;
# elif ULONG_MAX == 0xffffffff
typedef long int32_t;
typedef long int_least32_t;
typedef long int_fast32_t;
typedef unsigned long uint32_t;
typedef unsigned long uint_least32_t;
typedef unsigned long uint_fast32_t;
# else
# error defaults not correct; you must hand modify boost/stdint.h
# endif
// 64-bit types + intmax_t and uintmax_t -----------------------------------//
# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX)) && !(defined(_WIN32) && defined(__GNUC__))
# if(defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615) || \
(defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615)
// 2**64 - 1
typedef long long intmax_t;
typedef unsigned long long uintmax_t;
typedef long long int64_t;
typedef long long int_least64_t;
typedef long long int_fast64_t;
typedef unsigned long long uint64_t;
typedef unsigned long long uint_least64_t;
typedef unsigned long long uint_fast64_t;
# else
# error defaults not correct; you must hand modify boost/stdint.h
# endif
# elif ULONG_MAX != 0xffffffff
# if ULONG_MAX == 18446744073709551615 // 2**64 - 1
typedef long intmax_t;
typedef unsigned long uintmax_t;
typedef long int64_t;
typedef long int_least64_t;
typedef long int_fast64_t;
typedef unsigned long uint64_t;
typedef unsigned long uint_least64_t;
typedef unsigned long uint_fast64_t;
# else
# error defaults not correct; you must hand modify boost/stdint.h
# endif
# elif (defined(BOOST_MSVC) && (BOOST_MSVC >= 1100)) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x520))
//
// we have Borland/Microsoft __int64:
//
typedef __int64 intmax_t;
typedef unsigned __int64 uintmax_t;
typedef __int64 int64_t;
typedef __int64 int_least64_t;
typedef __int64 int_fast64_t;
typedef unsigned __int64 uint64_t;
typedef unsigned __int64 uint_least64_t;
typedef unsigned __int64 uint_fast64_t;
# else // assume no 64-bit integers
#define BOOST_NO_INT64_T
typedef int32_t intmax_t;
typedef uint32_t uintmax_t;
# endif
#endif // BOOST_SYSTEM_HAS_STDINT_H not defined
#endif // BOOST_STDINT_H
/****************************************************
Macro definition section:
Define various INTXX_C macros only if
__STDC_CONSTANT_MACROS is defined.
Undefine the macros if __STDC_CONSTANT_MACROS is
not defined and the macros are (cf <cassert>).
Added 23rd September (John Maddock).
******************************************************/
#if defined(__STDC_CONSTANT_MACROS) && !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED)
#define BOOST__STDC_CONSTANT_MACROS_DEFINED
#if (defined(BOOST_MSVC) && (BOOST_MSVC >= 1100)) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x520))
//
// Borland/Microsoft compilers have width specific suffixes:
//
#define INT8_C(value) value##i8
#define INT16_C(value) value##i16
#define INT32_C(value) value##i32
#define INT64_C(value) value##i64
#ifdef __BORLANDC__
// Borland bug: appending ui8 makes the type
// a signed char!!!!
#define UINT8_C(value) static_cast<unsigned char>(value##u)
#else
#define UINT8_C(value) value##ui8
#endif
#define UINT16_C(value) value##ui16
#define UINT32_C(value) value##ui32
#define UINT64_C(value) value##ui64
#define INTMAX_C(value) value##i64
#define UINTMAX_C(value) value##ui64
#else
// do it the old fashioned way:
// 8-bit types -------------------------------------------------------------//
# if UCHAR_MAX == 0xff
#define INT8_C(value) static_cast<int8_t>(value)
#define UINT8_C(value) static_cast<uint8_t>(value##u)
# endif
// 16-bit types ------------------------------------------------------------//
# if USHRT_MAX == 0xffff
#define INT16_C(value) static_cast<int16_t>(value)
#define UINT16_C(value) static_cast<uint16_t>(value##u)
# endif
// 32-bit types ------------------------------------------------------------//
# if UINT_MAX == 0xffffffff
#define INT32_C(value) value
#define UINT32_C(value) value##u
# elif ULONG_MAX == 0xffffffff
#define INT32_C(value) value##L
#define UINT32_C(value) value##uL
# endif
// 64-bit types + intmax_t and uintmax_t -----------------------------------//
# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX)) && !(defined(_WIN32) && defined(__GNUC__))
# if(defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615) || \
(defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615)
#define INT64_C(value) value##LL
#define UINT64_C(value) value##uLL
# else
# error defaults not correct; you must hand modify boost/stdint.h
# endif
# elif ULONG_MAX != 0xffffffff
# if ULONG_MAX == 18446744073709551615 // 2**64 - 1
#define INT64_C(value) value##L
#define UINT64_C(value) value##uL
# else
# error defaults not correct; you must hand modify boost/stdint.h
# endif
# elif (defined(BOOST_MSVC) && (BOOST_MSVC >= 1100)) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x520))
//
// we have Borland/Microsoft __int64:
//
#define INT64_C(value) value##i64
#define UINT64_C(value) value##ui64
# endif
#ifdef BOOST_NO_INT64_T
#define INTMAX_C(value) INT32_C(value)
#define UINTMAX_C(value) UINT32_C(value)
#else
#define INTMAX_C(value) INT64_C(value)
#define UINTMAX_C(value) UINT64_C(value)
#endif
#endif // Borland/MS specific
#elif defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(__STDC_CONSTANT_MACROS)
//
// undef all the macros:
//
#undef INT8_C
#undef INT16_C
#undef INT32_C
#undef INT64_C
#undef UINT8_C
#undef UINT16_C
#undef UINT32_C
#undef UINT64_C
#undef INTMAX_C
#undef UINTMAX_C
#endif // constant macros

View File

@ -90,7 +90,7 @@ instead.
<hr>
<p>Revised: <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %b %Y" startspan -->10 Feb 2001<!--webbot bot="Timestamp" endspan i-checksum="14373" -->
<p>Revised: <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %b %Y" startspan -->19 Aug 2001<!--webbot bot="Timestamp" endspan i-checksum="14767" -->
</p>
</body>

View File

@ -38,8 +38,12 @@ namespace boost
int test_main(int,char**)
{
#ifndef BOOST_NO_USING_TEMPLATE
using boost::int_t;
using boost::uint_t;
#else
using namespace boost;
#endif
#ifdef BOOST_SHOW_TYPES
std::cout << 32 << ' '; test( int_t<32>::least() );

View File

@ -35,14 +35,19 @@
* Therefore, avoid explicit function template instantiations.
*/
template<typename T> inline T make_char_numeric_for_streaming(T x) { return x; }
inline int make_char_numeric_for_streaming(char c) { return c; }
inline int make_char_numeric_for_streaming(signed char c) { return c; }
inline int make_char_numeric_for_streaming(unsigned char c) { return c; }
template<class T>
void runtest(const char * type, T)
{
typedef boost::integer_traits<T> traits;
std::cout << "Checking " << type
<< "; min is " << traits::min()
<< ", max is " << traits::max()
<< std::endl;
<< "; min is " << make_char_numeric_for_streaming(traits::min())
<< ", max is " << make_char_numeric_for_streaming(traits::max())
<< std::endl;
BOOST_TEST(traits::is_specialized);
BOOST_TEST(traits::is_integer);
BOOST_TEST(traits::is_integral);