Compare commits

..

2 Commits

Author SHA1 Message Date
7d70b2619d This commit was manufactured by cvs2svn to create tag
'Version_1_30_1'.

[SVN r19444]
2003-08-04 17:55:29 +00:00
c3666965b6 This commit was manufactured by cvs2svn to create branch 'RC_1_30_0'.
[SVN r17693]
2003-03-01 19:43:06 +00:00
7 changed files with 24 additions and 26 deletions

View File

@ -1,18 +1,21 @@
// boost cstdint.hpp test program ------------------------------------------//
// Copyright Beman Dawes 2000.
// See accompanying license for terms and conditions of use.
// (C) Copyright Beman Dawes 2000. 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/libs/integer for documentation.
// 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
#define __STDC_CONSTANT_MACROS
#include <cassert>
#include <iostream>
#define __STDC_CONSTANT_MACROS
#include <boost/cstdint.hpp>
#ifdef NDEBUG

View File

@ -131,7 +131,7 @@ namespace boost {
#else // BOOST_HAS_STDINT_H
# include <boost/limits.hpp> // implementation artifact; not part of interface
# include <limits.h> // implementation artifact; not part of interface
namespace boost
@ -245,15 +245,6 @@ namespace boost
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG)
__extension__ typedef long long intmax_t;
__extension__ typedef unsigned long long uintmax_t;
__extension__ typedef long long int64_t;
__extension__ typedef long long int_least64_t;
__extension__ typedef long long int_fast64_t;
__extension__ typedef unsigned long long uint64_t;
__extension__ typedef unsigned long long uint_least64_t;
__extension__ typedef unsigned long long uint_fast64_t;
# elif defined(BOOST_HAS_MS_INT64)
//
// we have Borland/Intel/Microsoft __int64:

View File

@ -1,7 +1,10 @@
// boost integer.hpp header file -------------------------------------------//
// Copyright Beman Dawes 1999.
// See accompanying license for terms and conditions of use.
// (C) Copyright Beman Dawes 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/libs/integer for documentation.

View File

@ -99,14 +99,13 @@ class integer_traits<wchar_t>
#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400))\
|| (defined __APPLE__)\
|| (defined(__OpenBSD__) && defined(__GNUC__))\
|| (defined(__NetBSD__) && defined(__GNUC__))\
|| (defined(__FreeBSD__) && defined(__GNUC__))\
|| (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
// - gcc on FreeBSD, OpenBSD and NetBSD
// - gcc on FreeBSD
public detail::integer_traits_base<wchar_t, INT_MIN, INT_MAX>
#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.
@ -216,4 +215,3 @@ class integer_traits<unsigned long long>
#endif /* BOOST_INTEGER_TRAITS_HPP */

View File

@ -1,9 +1,12 @@
// boost integer.hpp test program ------------------------------------------//
// Copyright Beman Dawes 1999.
// See accompanying license for terms and conditions of use.
// (C) Copyright Beman Dawes 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/libs/integer for documentation.
// See http://www.boost.org for most recent version including documentation.
// Revision History
// 04 Oct 01 Added tests for new templates; rewrote code (Daryle Walker)

View File

@ -55,14 +55,14 @@ void runtest(const char * type, T)
{
typedef boost::integer_traits<T> traits;
std::cout << "Checking " << type
<< "; min is " << make_char_numeric_for_streaming((traits::min)())
<< ", max is " << make_char_numeric_for_streaming((traits::max)())
<< "; 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);
BOOST_TEST(traits::const_min == (traits::min)());
BOOST_TEST(traits::const_max == (traits::max)());
BOOST_TEST(traits::const_min == traits::min());
BOOST_TEST(traits::const_max == traits::max());
}
int test_main(int, char*[])