forked from boostorg/integer
Compare commits
7 Commits
svn-branch
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
be6ee86efc | |||
365d61fc4e | |||
72438055a9 | |||
d131434ef1 | |||
90f779a9a3 | |||
1898e66238 | |||
cc73477d13 |
@ -50,6 +50,7 @@ boostbook standalone
|
||||
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/regex/doc/html
|
||||
;
|
||||
|
||||
install pdf-install : standalone : <location>. <install-type>PDF ;
|
||||
install pdfinstall : standalone/<format>pdf : <location>. <install-type>PDF ;
|
||||
explicit pdfinstall ;
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
// boost cstdint.hpp header file ------------------------------------------//
|
||||
|
||||
// (C) Copyright Beman Dawes 1999.
|
||||
// (C) Copyright Jens Mauer 2001
|
||||
// (C) Copyright John Maddock 2001
|
||||
// (C) Copyright Beman Dawes 1999.
|
||||
// (C) Copyright Jens Mauer 2001
|
||||
// (C) Copyright John Maddock 2001
|
||||
// Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
@ -24,9 +24,9 @@
|
||||
#define BOOST_CSTDINT_HPP
|
||||
|
||||
//
|
||||
// Since we always define the INT#_C macros as per C++0x,
|
||||
// Since we always define the INT#_C macros as per C++0x,
|
||||
// define __STDC_CONSTANT_MACROS so that <stdint.h> does the right
|
||||
// thing if possible, and so that the user knows that the macros
|
||||
// thing if possible, and so that the user knows that the macros
|
||||
// are actually defined as per C99.
|
||||
//
|
||||
#ifndef __STDC_CONSTANT_MACROS
|
||||
@ -41,7 +41,10 @@
|
||||
// so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG.
|
||||
// See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990
|
||||
//
|
||||
#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG))
|
||||
#if defined(BOOST_HAS_STDINT_H) \
|
||||
&& (!defined(__GLIBC__) \
|
||||
|| defined(__GLIBC_HAVE_LONG_LONG) \
|
||||
|| (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17)))))
|
||||
|
||||
// The following #include is an implementation artifact; not part of interface.
|
||||
# ifdef __hpux
|
||||
@ -50,7 +53,7 @@
|
||||
# ifdef __STDC_32_MODE__
|
||||
// this is triggered with GCC, because it defines __cplusplus < 199707L
|
||||
# define BOOST_NO_INT64_T
|
||||
# endif
|
||||
# endif
|
||||
# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX)
|
||||
# include <inttypes.h>
|
||||
# else
|
||||
@ -100,40 +103,40 @@ typedef ::uintfast64_t uint_fast64_t;
|
||||
namespace boost
|
||||
{
|
||||
|
||||
using ::int8_t;
|
||||
using ::int_least8_t;
|
||||
using ::int_fast8_t;
|
||||
using ::uint8_t;
|
||||
using ::uint_least8_t;
|
||||
using ::uint_fast8_t;
|
||||
|
||||
using ::int16_t;
|
||||
using ::int_least16_t;
|
||||
using ::int_fast16_t;
|
||||
using ::uint16_t;
|
||||
using ::uint_least16_t;
|
||||
using ::uint_fast16_t;
|
||||
|
||||
using ::int32_t;
|
||||
using ::int_least32_t;
|
||||
using ::int_fast32_t;
|
||||
using ::uint32_t;
|
||||
using ::uint_least32_t;
|
||||
using ::uint_fast32_t;
|
||||
|
||||
using ::int8_t;
|
||||
using ::int_least8_t;
|
||||
using ::int_fast8_t;
|
||||
using ::uint8_t;
|
||||
using ::uint_least8_t;
|
||||
using ::uint_fast8_t;
|
||||
|
||||
using ::int16_t;
|
||||
using ::int_least16_t;
|
||||
using ::int_fast16_t;
|
||||
using ::uint16_t;
|
||||
using ::uint_least16_t;
|
||||
using ::uint_fast16_t;
|
||||
|
||||
using ::int32_t;
|
||||
using ::int_least32_t;
|
||||
using ::int_fast32_t;
|
||||
using ::uint32_t;
|
||||
using ::uint_least32_t;
|
||||
using ::uint_fast32_t;
|
||||
|
||||
# ifndef BOOST_NO_INT64_T
|
||||
|
||||
using ::int64_t;
|
||||
using ::int_least64_t;
|
||||
using ::int_fast64_t;
|
||||
using ::uint64_t;
|
||||
using ::uint_least64_t;
|
||||
using ::uint_fast64_t;
|
||||
|
||||
using ::int64_t;
|
||||
using ::int_least64_t;
|
||||
using ::int_fast64_t;
|
||||
using ::uint64_t;
|
||||
using ::uint_least64_t;
|
||||
using ::uint_fast64_t;
|
||||
|
||||
# endif
|
||||
|
||||
using ::intmax_t;
|
||||
using ::uintmax_t;
|
||||
using ::intmax_t;
|
||||
using ::uintmax_t;
|
||||
|
||||
} // namespace boost
|
||||
|
||||
@ -143,35 +146,35 @@ namespace boost
|
||||
|
||||
namespace boost {
|
||||
|
||||
using ::int8_t;
|
||||
typedef int8_t int_least8_t;
|
||||
typedef int8_t int_fast8_t;
|
||||
using ::uint8_t;
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef uint8_t uint_fast8_t;
|
||||
|
||||
using ::int16_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef int16_t int_fast16_t;
|
||||
using ::uint16_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef uint16_t uint_fast16_t;
|
||||
|
||||
using ::int32_t;
|
||||
typedef int32_t int_least32_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
using ::uint32_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
|
||||
# ifndef BOOST_NO_INT64_T
|
||||
using ::int8_t;
|
||||
typedef int8_t int_least8_t;
|
||||
typedef int8_t int_fast8_t;
|
||||
using ::uint8_t;
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef uint8_t uint_fast8_t;
|
||||
|
||||
using ::int64_t;
|
||||
typedef int64_t int_least64_t;
|
||||
typedef int64_t int_fast64_t;
|
||||
using ::uint64_t;
|
||||
typedef uint64_t uint_least64_t;
|
||||
typedef uint64_t uint_fast64_t;
|
||||
using ::int16_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef int16_t int_fast16_t;
|
||||
using ::uint16_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef uint16_t uint_fast16_t;
|
||||
|
||||
using ::int32_t;
|
||||
typedef int32_t int_least32_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
using ::uint32_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
|
||||
# ifndef BOOST_NO_INT64_T
|
||||
|
||||
using ::int64_t;
|
||||
typedef int64_t int_least64_t;
|
||||
typedef int64_t int_fast64_t;
|
||||
using ::uint64_t;
|
||||
typedef uint64_t uint_least64_t;
|
||||
typedef uint64_t uint_fast64_t;
|
||||
|
||||
typedef int64_t intmax_t;
|
||||
typedef uint64_t uintmax_t;
|
||||
@ -235,15 +238,15 @@ namespace boost
|
||||
typedef unsigned short uint_least16_t;
|
||||
typedef unsigned short uint_fast16_t;
|
||||
# endif
|
||||
# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__)
|
||||
// On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified
|
||||
// MTA / XMT does support the following non-standard integer types
|
||||
typedef __short16 int16_t;
|
||||
typedef __short16 int_least16_t;
|
||||
typedef __short16 int_fast16_t;
|
||||
typedef unsigned __short16 uint16_t;
|
||||
typedef unsigned __short16 uint_least16_t;
|
||||
typedef unsigned __short16 uint_fast16_t;
|
||||
# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__)
|
||||
// On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified
|
||||
// MTA / XMT does support the following non-standard integer types
|
||||
typedef __short16 int16_t;
|
||||
typedef __short16 int_least16_t;
|
||||
typedef __short16 int_fast16_t;
|
||||
typedef unsigned __short16 uint16_t;
|
||||
typedef unsigned __short16 uint_least16_t;
|
||||
typedef unsigned __short16 uint_fast16_t;
|
||||
# elif (USHRT_MAX == 0xffffffff) && defined(CRAY)
|
||||
// no 16-bit types on Cray:
|
||||
typedef short int_least16_t;
|
||||
@ -277,14 +280,14 @@ namespace boost
|
||||
typedef unsigned long uint32_t;
|
||||
typedef unsigned long uint_least32_t;
|
||||
typedef unsigned long uint_fast32_t;
|
||||
# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__)
|
||||
// Integers are 64 bits on the MTA / XMT
|
||||
typedef __int32 int32_t;
|
||||
typedef __int32 int_least32_t;
|
||||
typedef __int32 int_fast32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int32 uint_least32_t;
|
||||
typedef unsigned __int32 uint_fast32_t;
|
||||
# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__)
|
||||
// Integers are 64 bits on the MTA / XMT
|
||||
typedef __int32 int32_t;
|
||||
typedef __int32 int_least32_t;
|
||||
typedef __int32 int_fast32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int32 uint_least32_t;
|
||||
typedef unsigned __int32 uint_fast32_t;
|
||||
# else
|
||||
# error defaults not correct; you must hand modify boost/cstdint.hpp
|
||||
# endif
|
||||
@ -358,6 +361,40 @@ namespace boost
|
||||
|
||||
#endif // BOOST_HAS_STDINT_H
|
||||
|
||||
// intptr_t/uintptr_t are defined separately because they are optional and not universally available
|
||||
#if defined(BOOST_WINDOWS) && !defined(_WIN32_WCE) && !defined(BOOST_HAS_STDINT_H)
|
||||
// Older MSVC don't have stdint.h and have intptr_t/uintptr_t defined in stddef.h
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
// PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config.
|
||||
#if !defined(__PGIC__)
|
||||
|
||||
#if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \
|
||||
|| (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \
|
||||
|| defined(__CYGWIN__) \
|
||||
|| defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
|
||||
|| defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
|
||||
namespace boost {
|
||||
using ::intptr_t;
|
||||
using ::uintptr_t;
|
||||
}
|
||||
#define BOOST_HAS_INTPTR_T
|
||||
|
||||
// Clang pretends to be GCC, so it'll match this condition
|
||||
#elif defined(__GNUC__) && defined(__INTPTR_TYPE__) && defined(__UINTPTR_TYPE__)
|
||||
|
||||
namespace boost {
|
||||
typedef __INTPTR_TYPE__ intptr_t;
|
||||
typedef __UINTPTR_TYPE__ uintptr_t;
|
||||
}
|
||||
#define BOOST_HAS_INTPTR_T
|
||||
|
||||
#endif
|
||||
|
||||
#endif // !defined(__PGIC__)
|
||||
|
||||
#endif // BOOST_CSTDINT_HPP
|
||||
|
||||
|
||||
@ -376,15 +413,15 @@ INT#_C macros if they're not already defined (John Maddock).
|
||||
#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \
|
||||
(!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C))
|
||||
//
|
||||
// For the following code we get several warnings along the lines of:
|
||||
//
|
||||
// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant
|
||||
//
|
||||
// So we declare this a system header to suppress these warnings.
|
||||
// For the following code we get several warnings along the lines of:
|
||||
//
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant
|
||||
//
|
||||
// So we declare this a system header to suppress these warnings.
|
||||
//
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
# define BOOST__STDC_CONSTANT_MACROS_DEFINED
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <boost/integer_traits.hpp> // for boost::::boost::integer_traits
|
||||
#include <boost/limits.hpp> // for ::std::numeric_limits
|
||||
#include <boost/cstdint.hpp> // for boost::int64_t and BOOST_NO_INTEGRAL_INT64_T
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
//
|
||||
// We simply cannot include this header on gcc without getting copious warnings of the kind:
|
||||
@ -51,6 +52,7 @@ namespace boost
|
||||
|
||||
// convert category to type
|
||||
template< int Category > struct int_least_helper {}; // default is empty
|
||||
template< int Category > struct uint_least_helper {}; // default is empty
|
||||
|
||||
// specializatons: 1=long, 2=int, 3=short, 4=signed char,
|
||||
// 6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned char
|
||||
@ -65,14 +67,14 @@ namespace boost
|
||||
template<> struct int_least_helper<4> { typedef short least; };
|
||||
template<> struct int_least_helper<5> { typedef signed char least; };
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; };
|
||||
template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; };
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
template<> struct int_least_helper<6> { typedef unsigned __int64 least; };
|
||||
template<> struct uint_least_helper<1> { typedef unsigned __int64 least; };
|
||||
#endif
|
||||
template<> struct int_least_helper<7> { typedef unsigned long least; };
|
||||
template<> struct int_least_helper<8> { typedef unsigned int least; };
|
||||
template<> struct int_least_helper<9> { typedef unsigned short least; };
|
||||
template<> struct int_least_helper<10> { typedef unsigned char least; };
|
||||
template<> struct uint_least_helper<2> { typedef unsigned long least; };
|
||||
template<> struct uint_least_helper<3> { typedef unsigned int least; };
|
||||
template<> struct uint_least_helper<4> { typedef unsigned short least; };
|
||||
template<> struct uint_least_helper<5> { typedef unsigned char least; };
|
||||
|
||||
template <int Bits>
|
||||
struct exact_signed_base_helper{};
|
||||
@ -111,10 +113,12 @@ namespace boost
|
||||
template< int Bits > // bits (including sign) required
|
||||
struct int_t : public detail::exact_signed_base_helper<Bits>
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::intmax_t) * CHAR_BIT),
|
||||
"No suitable signed integer type with the requested number of bits is available.");
|
||||
typedef typename detail::int_least_helper
|
||||
<
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
(Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
|
||||
(Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
|
||||
#else
|
||||
1 +
|
||||
#endif
|
||||
@ -130,6 +134,8 @@ namespace boost
|
||||
template< int Bits > // bits required
|
||||
struct uint_t : public detail::exact_unsigned_base_helper<Bits>
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::uintmax_t) * CHAR_BIT),
|
||||
"No suitable unsigned integer type with the requested number of bits is available.");
|
||||
#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T)
|
||||
// It's really not clear why this workaround should be needed... shrug I guess! JM
|
||||
BOOST_STATIC_CONSTANT(int, s =
|
||||
@ -140,11 +146,10 @@ namespace boost
|
||||
(Bits <= ::std::numeric_limits<unsigned char>::digits));
|
||||
typedef typename detail::int_least_helper< ::boost::uint_t<Bits>::s>::least least;
|
||||
#else
|
||||
typedef typename detail::int_least_helper
|
||||
typedef typename detail::uint_least_helper
|
||||
<
|
||||
5 +
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
(Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
|
||||
(Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
|
||||
#else
|
||||
1 +
|
||||
#endif
|
||||
@ -217,7 +222,7 @@ namespace boost
|
||||
// It's really not clear why this workaround should be needed... shrug I guess! JM
|
||||
#if defined(BOOST_NO_INTEGRAL_INT64_T)
|
||||
BOOST_STATIC_CONSTANT(unsigned, which =
|
||||
6 +
|
||||
1 +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
|
||||
@ -225,18 +230,17 @@ namespace boost
|
||||
typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
|
||||
#else // BOOST_NO_INTEGRAL_INT64_T
|
||||
BOOST_STATIC_CONSTANT(unsigned, which =
|
||||
5 +
|
||||
1 +
|
||||
(MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
|
||||
(MaxValue <= ::boost::integer_traits<unsigned char>::const_max));
|
||||
typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
|
||||
typedef typename detail::uint_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
|
||||
#endif // BOOST_NO_INTEGRAL_INT64_T
|
||||
#else
|
||||
typedef typename detail::int_least_helper
|
||||
typedef typename detail::uint_least_helper
|
||||
<
|
||||
5 +
|
||||
#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
|
||||
(MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
|
||||
#else
|
||||
|
@ -22,4 +22,10 @@ test-suite integer
|
||||
[ compile static_log2_include_test.cpp ]
|
||||
[ compile static_min_max_include_test.cpp ]
|
||||
[ compile integer_fwd_include_test.cpp ]
|
||||
[ compile-fail fail_int_exact.cpp ]
|
||||
[ compile-fail fail_int_fast.cpp ]
|
||||
[ compile-fail fail_int_least.cpp ]
|
||||
[ compile-fail fail_uint_exact.cpp ]
|
||||
[ compile-fail fail_uint_fast.cpp ]
|
||||
[ compile-fail fail_uint_least.cpp ]
|
||||
;
|
||||
|
8
test/fail_int_exact.cpp
Normal file
8
test/fail_int_exact.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
typedef boost::int_t<sizeof(boost::intmax_t)*CHAR_BIT + 1>::exact fail_int_exact;
|
8
test/fail_int_fast.cpp
Normal file
8
test/fail_int_fast.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
typedef boost::int_t<sizeof(boost::intmax_t)*CHAR_BIT + 1>::fast fail_int_fast;
|
8
test/fail_int_least.cpp
Normal file
8
test/fail_int_least.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
typedef boost::int_t<sizeof(boost::intmax_t)*CHAR_BIT + 1>::least fail_int_least;
|
8
test/fail_uint_exact.cpp
Normal file
8
test/fail_uint_exact.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
typedef boost::uint_t<sizeof(boost::intmax_t)*CHAR_BIT + 1>::exact fail_uint_exact;
|
8
test/fail_uint_fast.cpp
Normal file
8
test/fail_uint_fast.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
typedef boost::uint_t<sizeof(boost::intmax_t)*CHAR_BIT + 1>::fast fail_uint_fast;
|
8
test/fail_uint_least.cpp
Normal file
8
test/fail_uint_least.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
typedef boost::uint_t<sizeof(boost::intmax_t)*CHAR_BIT + 1>::least fail_uint_least;
|
@ -152,7 +152,7 @@ void do_test_bits()
|
||||
if(boost::detail::test_errors() != last_error_count)
|
||||
{
|
||||
last_error_count = boost::detail::test_errors();
|
||||
std::cout << "Errors occured while testing with bit count = " << Bits << std::endl;
|
||||
std::cout << "Errors occurred while testing with bit count = " << Bits << std::endl;
|
||||
std::cout << "Type int_t<" << Bits << ">::least was " << get_name_of_type(least_int(0)) << std::endl;
|
||||
std::cout << "Type int_t<" << Bits << ">::fast was " << get_name_of_type(fast_int(0)) << std::endl;
|
||||
std::cout << "Type uint_t<" << Bits << ">::least was " << get_name_of_type(least_uint(0)) << std::endl;
|
||||
|
Reference in New Issue
Block a user