| 
									
										
										
										
											2000-07-07 16:04:40 +00:00
										 |  |  | //  boost integer.hpp test program  ------------------------------------------//
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | //  Copyright Beman Dawes 1999.  
 | 
					
						
							|  |  |  | //  Copyright Daryle Walker 2001.  
 | 
					
						
							|  |  |  | //  Copyright John Maddock 2009.  
 | 
					
						
							|  |  |  | //  Distributed under the Boost
 | 
					
						
							| 
									
										
										
										
											2004-07-25 12:01:00 +00:00
										 |  |  | //  Software License, Version 1.0. (See accompanying file
 | 
					
						
							|  |  |  | //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-11 18:57:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2003-09-12 17:09:29 +00:00
										 |  |  | //  See http://www.boost.org/libs/integer for documentation.
 | 
					
						
							| 
									
										
										
										
											2000-07-07 16:04:40 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | //  Revision History
 | 
					
						
							| 
									
										
										
										
											2001-12-03 03:29:57 +00:00
										 |  |  | //   04 Oct 01  Added tests for new templates; rewrote code (Daryle Walker)
 | 
					
						
							| 
									
										
										
										
											2001-03-11 13:31:00 +00:00
										 |  |  | //   10 Mar 01  Boost Test Library now used for tests (Beman Dawes)
 | 
					
						
							| 
									
										
										
										
											2000-07-07 16:04:40 +00:00
										 |  |  | //   31 Aug 99  Initial version
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  | #include <boost/detail/lightweight_test.hpp>  // for main, BOOST_TEST
 | 
					
						
							| 
									
										
										
										
											2009-11-11 18:57:24 +00:00
										 |  |  | #include <boost/integer.hpp>  // for boost::int_t, boost::uint_t
 | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | #include <boost/type_traits/is_same.hpp>
 | 
					
						
							| 
									
										
										
										
											2008-07-14 04:25:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-11 18:57:24 +00:00
										 |  |  | #include <climits>   // for ULONG_MAX, LONG_MAX, LONG_MIN
 | 
					
						
							|  |  |  | #include <iostream>  // for std::cout (std::endl indirectly)
 | 
					
						
							|  |  |  | #include <typeinfo>  // for std::type_info
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 10:43:00 +00:00
										 |  |  | #ifdef BOOST_MSVC
 | 
					
						
							|  |  |  | #pragma warning(disable:4127) // conditional expression is constant
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  | #if defined( __BORLANDC__ )
 | 
					
						
							|  |  |  | # pragma option -w-8008 -w-8066 // condition is always true
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | //
 | 
					
						
							|  |  |  | // Keep track of error count, so we can print out detailed
 | 
					
						
							|  |  |  | // info only if we need it:
 | 
					
						
							|  |  |  | //
 | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  | int last_error_count = 0; | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | //
 | 
					
						
							|  |  |  | // Helpers to print out the name of a type,
 | 
					
						
							|  |  |  | // we use these as typeid(X).name() doesn't always
 | 
					
						
							|  |  |  | // return a human readable string:
 | 
					
						
							|  |  |  | //
 | 
					
						
							|  |  |  | template <class T> const char* get_name_of_type(T){ return typeid(T).name(); } | 
					
						
							|  |  |  | const char* get_name_of_type(signed char){ return "signed char"; } | 
					
						
							|  |  |  | const char* get_name_of_type(unsigned char){ return "unsigned char"; } | 
					
						
							|  |  |  | const char* get_name_of_type(short){ return "short"; } | 
					
						
							|  |  |  | const char* get_name_of_type(unsigned short){ return "unsigned short"; } | 
					
						
							|  |  |  | const char* get_name_of_type(int){ return "int"; } | 
					
						
							|  |  |  | const char* get_name_of_type(unsigned int){ return "unsigned int"; } | 
					
						
							|  |  |  | const char* get_name_of_type(long){ return "long"; } | 
					
						
							|  |  |  | const char* get_name_of_type(unsigned long){ return "unsigned long"; } | 
					
						
							|  |  |  | #ifdef BOOST_HAS_LONG_LONG
 | 
					
						
							| 
									
										
										
										
											2009-11-29 13:59:18 +00:00
										 |  |  | const char* get_name_of_type(boost::long_long_type){ return "boost::long_long_type"; } | 
					
						
							|  |  |  | const char* get_name_of_type(boost::ulong_long_type){ return "boost::ulong_long_type"; } | 
					
						
							| 
									
										
										
										
											2008-07-25 12:39:06 +00:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | template <int Bits> | 
					
						
							|  |  |  | void do_test_exact(boost::mpl::true_ const&) | 
					
						
							| 
									
										
										
										
											2000-07-07 16:04:40 +00:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |    // Test the ::exact member:
 | 
					
						
							|  |  |  |    typedef typename boost::int_t<Bits>::exact int_exact; | 
					
						
							|  |  |  |    typedef typename boost::uint_t<Bits>::exact uint_exact; | 
					
						
							|  |  |  |    typedef typename boost::int_t<Bits>::least least_int; | 
					
						
							|  |  |  |    typedef typename boost::uint_t<Bits>::least least_uint; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |    BOOST_TEST((boost::is_same<int_exact, least_int>::value)); | 
					
						
							|  |  |  |    BOOST_TEST((boost::is_same<uint_exact, least_uint>::value)); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | } | 
					
						
							|  |  |  | template <int Bits> | 
					
						
							|  |  |  | void do_test_exact(boost::mpl::false_ const&) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |    // Nothing to do, type does not have an ::extact member.
 | 
					
						
							| 
									
										
										
										
											2000-07-07 16:04:40 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | template <int Bits> | 
					
						
							|  |  |  | void do_test_bits() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |    //
 | 
					
						
							|  |  |  |    // Recurse to next smallest number of bits:
 | 
					
						
							|  |  |  |    //
 | 
					
						
							|  |  |  |    do_test_bits<Bits - 1>(); | 
					
						
							|  |  |  |    //
 | 
					
						
							|  |  |  |    // Test exact types if we have them:
 | 
					
						
							|  |  |  |    //
 | 
					
						
							|  |  |  |    do_test_exact<Bits>( | 
					
						
							|  |  |  |       boost::mpl::bool_< | 
					
						
							|  |  |  |       (sizeof(unsigned char) * CHAR_BIT == Bits) | 
					
						
							|  |  |  |       || (sizeof(unsigned short) * CHAR_BIT == Bits) | 
					
						
							|  |  |  |       || (sizeof(unsigned int) * CHAR_BIT == Bits) | 
					
						
							|  |  |  |       || (sizeof(unsigned long) * CHAR_BIT == Bits) | 
					
						
							|  |  |  | #ifdef BOOST_HAS_LONG_LONG
 | 
					
						
							| 
									
										
										
										
											2009-11-29 13:59:18 +00:00
										 |  |  |       || (sizeof(boost::ulong_long_type) * CHAR_BIT == Bits) | 
					
						
							| 
									
										
										
										
											2008-07-25 12:39:06 +00:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |       >()); | 
					
						
							|  |  |  |    //
 | 
					
						
							|  |  |  |    // We need to check all aspects of the members of int_t<Bits> and uint_t<Bits>:
 | 
					
						
							|  |  |  |    //
 | 
					
						
							|  |  |  |    typedef typename boost::int_t<Bits>::least least_int; | 
					
						
							|  |  |  |    typedef typename boost::int_t<Bits>::least fast_int; | 
					
						
							|  |  |  |    typedef typename boost::uint_t<Bits>::least least_uint; | 
					
						
							|  |  |  |    typedef typename boost::uint_t<Bits>::fast fast_uint; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |    if(std::numeric_limits<least_int>::is_specialized) | 
					
						
							|  |  |  |    { | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |       BOOST_TEST(std::numeric_limits<least_int>::digits + 1 >= Bits); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |    } | 
					
						
							|  |  |  |    if(std::numeric_limits<least_uint>::is_specialized) | 
					
						
							|  |  |  |    { | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |       BOOST_TEST(std::numeric_limits<least_uint>::digits >= Bits); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |    } | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |    BOOST_TEST(sizeof(least_int) * CHAR_BIT >= Bits); | 
					
						
							|  |  |  |    BOOST_TEST(sizeof(least_uint) * CHAR_BIT >= Bits); | 
					
						
							|  |  |  |    BOOST_TEST(sizeof(fast_int) >= sizeof(least_int)); | 
					
						
							|  |  |  |    BOOST_TEST(sizeof(fast_uint) >= sizeof(least_uint)); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |    //
 | 
					
						
							|  |  |  |    // There should be no type smaller than least_* that also has enough bits:
 | 
					
						
							|  |  |  |    //
 | 
					
						
							|  |  |  |    if(!boost::is_same<signed char, least_int>::value) | 
					
						
							|  |  |  |    { | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |       BOOST_TEST(std::numeric_limits<signed char>::digits < Bits); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |       if(!boost::is_same<short, least_int>::value) | 
					
						
							|  |  |  |       { | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |          BOOST_TEST(std::numeric_limits<short>::digits < Bits); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |          if(!boost::is_same<int, least_int>::value) | 
					
						
							|  |  |  |          { | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |             BOOST_TEST(std::numeric_limits<int>::digits < Bits); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |             if(!boost::is_same<long, least_int>::value) | 
					
						
							|  |  |  |             { | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |                BOOST_TEST(std::numeric_limits<long>::digits < Bits); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |             } | 
					
						
							|  |  |  |          } | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |    } | 
					
						
							|  |  |  |    // And again, but unsigned:
 | 
					
						
							|  |  |  |    if(!boost::is_same<unsigned char, least_uint>::value) | 
					
						
							|  |  |  |    { | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |       BOOST_TEST(std::numeric_limits<unsigned char>::digits < Bits); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |       if(!boost::is_same<unsigned short, least_uint>::value) | 
					
						
							|  |  |  |       { | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |          BOOST_TEST(std::numeric_limits<unsigned short>::digits < Bits); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |          if(!boost::is_same<unsigned int, least_uint>::value) | 
					
						
							|  |  |  |          { | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |             BOOST_TEST(std::numeric_limits<unsigned int>::digits < Bits); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |             if(!boost::is_same<unsigned long, least_uint>::value) | 
					
						
							|  |  |  |             { | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |                BOOST_TEST(std::numeric_limits<unsigned long>::digits < Bits); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |             } | 
					
						
							|  |  |  |          } | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |    } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |    if(boost::detail::test_errors() != last_error_count) | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |    { | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |       last_error_count = boost::detail::test_errors(); | 
					
						
							| 
									
										
										
										
											2011-12-24 17:29:03 +00:00
										 |  |  |       std::cout << "Errors occurred while testing with bit count = " << Bits << std::endl; | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |       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; | 
					
						
							|  |  |  |       std::cout << "Type uint_t<" << Bits << ">::fast was " << get_name_of_type(fast_uint(0)) << std::endl; | 
					
						
							|  |  |  |    } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | template <> | 
					
						
							|  |  |  | void do_test_bits<-1>() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |    // Nothing to do here!!
 | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2008-07-13 21:08:16 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-30 13:50:05 +00:00
										 |  |  | template <class Traits, class Expected> | 
					
						
							|  |  |  | void test_min_max_type(Expected val) | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | { | 
					
						
							|  |  |  |    typedef typename Traits::least least_type; | 
					
						
							|  |  |  |    typedef typename Traits::fast  fast_type; | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  |    BOOST_TEST((boost::is_same<least_type, Expected>::value)); | 
					
						
							|  |  |  |    BOOST_TEST(sizeof(fast_type) >= sizeof(least_type)); | 
					
						
							|  |  |  |    BOOST_TEST((std::numeric_limits<least_type>::min)() <= val); | 
					
						
							|  |  |  |    BOOST_TEST((std::numeric_limits<least_type>::max)() >= val); | 
					
						
							| 
									
										
										
										
											2009-11-29 13:59:18 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |    if(boost::detail::test_errors() != last_error_count) | 
					
						
							|  |  |  |    { | 
					
						
							|  |  |  |       last_error_count = boost::detail::test_errors(); | 
					
						
							|  |  |  |       std::cout << "Traits type is: " << typeid(Traits).name() << std::endl; | 
					
						
							|  |  |  |       std::cout << "Least type is: " << get_name_of_type(least_type(0)) << std::endl; | 
					
						
							|  |  |  |       std::cout << "Fast type is: " << get_name_of_type(fast_type(0)) << std::endl; | 
					
						
							|  |  |  |       std::cout << "Expected type is: " << get_name_of_type(Expected(0)) << std::endl; | 
					
						
							|  |  |  |       std::cout << "Required value is: " << val << std::endl; | 
					
						
							|  |  |  |    } | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-11-11 18:57:24 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | // Test program
 | 
					
						
							| 
									
										
										
										
											2009-11-26 12:59:39 +00:00
										 |  |  | int main(int, char*[]) | 
					
						
							| 
									
										
										
										
											2008-07-16 09:55:31 +00:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  |    // Test int_t and unint_t first:
 | 
					
						
							|  |  |  |    if(std::numeric_limits<boost::intmax_t>::is_specialized) | 
					
						
							|  |  |  |       do_test_bits<std::numeric_limits<boost::uintmax_t>::digits>(); | 
					
						
							|  |  |  |    else | 
					
						
							|  |  |  |       do_test_bits<std::numeric_limits<long>::digits>(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |    //
 | 
					
						
							|  |  |  |    // Test min and max value types:
 | 
					
						
							|  |  |  |    //
 | 
					
						
							|  |  |  |    test_min_max_type<boost::int_max_value_t<SCHAR_MAX>, signed char>(SCHAR_MAX); | 
					
						
							|  |  |  |    test_min_max_type<boost::int_min_value_t<SCHAR_MIN>, signed char>(SCHAR_MIN); | 
					
						
							|  |  |  |    test_min_max_type<boost::uint_value_t<UCHAR_MAX>, unsigned char>(UCHAR_MAX); | 
					
						
							|  |  |  | #if(USHRT_MAX != UCHAR_MAX)
 | 
					
						
							|  |  |  |       test_min_max_type<boost::int_max_value_t<SCHAR_MAX+1>, short>(SCHAR_MAX+1); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<SCHAR_MIN-1>, short>(SCHAR_MIN-1); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<UCHAR_MAX+1>, unsigned short>(UCHAR_MAX+1); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_max_value_t<SHRT_MAX>, short>(SHRT_MAX); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<SHRT_MIN>, short>(SHRT_MIN); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<USHRT_MAX>, unsigned short>(USHRT_MAX); | 
					
						
							| 
									
										
										
										
											2008-07-25 12:39:06 +00:00
										 |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | #if(UINT_MAX != USHRT_MAX)
 | 
					
						
							|  |  |  |       test_min_max_type<boost::int_max_value_t<SHRT_MAX+1>, int>(SHRT_MAX+1); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<SHRT_MIN-1>, int>(SHRT_MIN-1); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<USHRT_MAX+1>, unsigned int>(USHRT_MAX+1); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_max_value_t<INT_MAX>, int>(INT_MAX); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<INT_MIN>, int>(INT_MIN); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<UINT_MAX>, unsigned int>(UINT_MAX); | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | #if(ULONG_MAX != UINT_MAX)
 | 
					
						
							|  |  |  |       test_min_max_type<boost::int_max_value_t<INT_MAX+1L>, long>(INT_MAX+1L); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<INT_MIN-1L>, long>(INT_MIN-1L); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<UINT_MAX+1uL>, unsigned long>(UINT_MAX+1uL); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_max_value_t<LONG_MAX>, long>(LONG_MAX); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<LONG_MIN>, long>(LONG_MIN); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<ULONG_MAX>, unsigned long>(ULONG_MAX); | 
					
						
							|  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2009-11-29 16:02:45 +00:00
										 |  |  | #ifndef BOOST_NO_INTEGRAL_INT64_T
 | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | #if defined(BOOST_HAS_LONG_LONG) && (defined(ULLONG_MAX) && (ULLONG_MAX != ULONG_MAX))
 | 
					
						
							| 
									
										
										
										
											2009-11-29 13:59:18 +00:00
										 |  |  |       test_min_max_type<boost::int_max_value_t<LONG_MAX+1LL>, boost::long_long_type>(LONG_MAX+1LL); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<LONG_MIN-1LL>, boost::long_long_type>(LONG_MIN-1LL); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<ULONG_MAX+1uLL>, boost::ulong_long_type>(ULONG_MAX+1uLL); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_max_value_t<LLONG_MAX>, boost::long_long_type>(LLONG_MAX); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<LLONG_MIN>, boost::long_long_type>(LLONG_MIN); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<ULLONG_MAX>, boost::ulong_long_type>(ULLONG_MAX); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | #if defined(BOOST_HAS_LONG_LONG) && (defined(ULONG_LONG_MAX) && (ULONG_LONG_MAX != ULONG_MAX))
 | 
					
						
							| 
									
										
										
										
											2009-11-29 13:59:18 +00:00
										 |  |  |       test_min_max_type<boost::int_max_value_t<LONG_MAX+1LL>, boost::long_long_type>(LONG_MAX+1LL); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<LONG_MIN-1LL>, boost::long_long_type>(LONG_MIN-1LL); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<ULONG_MAX+1uLL>, boost::ulong_long_type>(ULONG_MAX+1uLL); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_max_value_t<LONG_LONG_MAX>, boost::long_long_type>(LONG_LONG_MAX); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<LONG_LONG_MIN>, boost::long_long_type>(LONG_LONG_MIN); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<ULONG_LONG_MAX>, boost::ulong_long_type>(ULONG_LONG_MAX); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | #if defined(BOOST_HAS_LONG_LONG) && (defined(ULONGLONG_MAX) && (ULONGLONG_MAX != ULONG_MAX))
 | 
					
						
							| 
									
										
										
										
											2009-11-29 13:59:18 +00:00
										 |  |  |       test_min_max_type<boost::int_max_value_t<LONG_MAX+1LL>, boost::long_long_type>(LONG_MAX+1LL); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<LONG_MIN-1LL>, boost::long_long_type>(LONG_MIN-1LL); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<ULONG_MAX+1uLL>, boost::ulong_long_type>(ULONG_MAX+1uLL); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_max_value_t<LONGLONG_MAX>, boost::long_long_type>(LONGLONG_MAX); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<LONGLONG_MIN>, boost::long_long_type>(LONGLONG_MAX); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<ULONGLONG_MAX>, boost::ulong_long_type>(ULONGLONG_MAX); | 
					
						
							| 
									
										
										
										
											2009-11-26 11:08:27 +00:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | #if defined(BOOST_HAS_LONG_LONG) && (defined(_ULLONG_MAX) && defined(_LLONG_MIN) && (_ULLONG_MAX != ULONG_MAX))
 | 
					
						
							| 
									
										
										
										
											2009-11-29 13:59:18 +00:00
										 |  |  |       test_min_max_type<boost::int_max_value_t<LONG_MAX+1LL>, boost::long_long_type>(LONG_MAX+1LL); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<LONG_MIN-1LL>, boost::long_long_type>(LONG_MIN-1LL); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<ULONG_MAX+1uLL>, boost::ulong_long_type>(ULONG_MAX+1uLL); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_max_value_t<_LLONG_MAX>, boost::long_long_type>(_LLONG_MAX); | 
					
						
							|  |  |  |       test_min_max_type<boost::int_min_value_t<_LLONG_MIN>, boost::long_long_type>(_LLONG_MIN); | 
					
						
							|  |  |  |       test_min_max_type<boost::uint_value_t<_ULLONG_MAX>, boost::ulong_long_type>(_ULLONG_MAX); | 
					
						
							| 
									
										
										
										
											2009-11-29 16:02:45 +00:00
										 |  |  | #endif // BOOST_HAS_LONG_LONG
 | 
					
						
							|  |  |  | #endif // BOOST_NO_INTEGRAL_INT64_T
 | 
					
						
							| 
									
										
										
										
											2009-11-26 13:35:03 +00:00
										 |  |  |       return boost::report_errors(); | 
					
						
							| 
									
										
										
										
											2008-07-07 23:13:43 +00:00
										 |  |  | } |