Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58031 - in trunk: boost libs/integer/test
From: john_at_[hidden]
Date: 2009-11-29 11:02:46


Author: johnmaddock
Date: 2009-11-29 11:02:45 EST (Sun, 29 Nov 2009)
New Revision: 58031
URL: http://svn.boost.org/trac/boost/changeset/58031

Log:
Make code respect BOOST_NO_INTEGRAL_INT64_T.
Text files modified:
   trunk/boost/integer.hpp | 6 +++---
   trunk/libs/integer/test/integer_test.cpp | 4 +++-
   trunk/libs/integer/test/integer_traits_include_test.cpp | 2 +-
   trunk/libs/integer/test/integer_traits_test.cpp | 2 +-
   4 files changed, 8 insertions(+), 6 deletions(-)

Modified: trunk/boost/integer.hpp
==============================================================================
--- trunk/boost/integer.hpp (original)
+++ trunk/boost/integer.hpp 2009-11-29 11:02:45 EST (Sun, 29 Nov 2009)
@@ -155,7 +155,7 @@
   {
       typedef typename detail::int_least_helper
         <
-#ifdef BOOST_HAS_LONG_LONG
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
           (MaxValue <= ::boost::integer_traits<boost::long_long_type>::const_max) +
 #else
            1 +
@@ -177,7 +177,7 @@
   {
       typedef typename detail::int_least_helper
         <
-#ifdef BOOST_HAS_LONG_LONG
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
           (MinValue >= ::boost::integer_traits<boost::long_long_type>::const_min) +
 #else
            1 +
@@ -201,7 +201,7 @@
       typedef typename detail::int_least_helper
         <
           5 +
-#ifdef BOOST_HAS_LONG_LONG
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
           (MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
 #else
            1 +

Modified: trunk/libs/integer/test/integer_test.cpp
==============================================================================
--- trunk/libs/integer/test/integer_test.cpp (original)
+++ trunk/libs/integer/test/integer_test.cpp 2009-11-29 11:02:45 EST (Sun, 29 Nov 2009)
@@ -225,6 +225,7 @@
       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
+#ifndef BOOST_NO_INTEGRAL_INT64_T
 #if defined(BOOST_HAS_LONG_LONG) && (defined(ULLONG_MAX) && (ULLONG_MAX != ULONG_MAX))
       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);
@@ -256,6 +257,7 @@
       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);
-#endif
+#endif // BOOST_HAS_LONG_LONG
+#endif // BOOST_NO_INTEGRAL_INT64_T
       return boost::report_errors();
 }

Modified: trunk/libs/integer/test/integer_traits_include_test.cpp
==============================================================================
--- trunk/libs/integer/test/integer_traits_include_test.cpp (original)
+++ trunk/libs/integer/test/integer_traits_include_test.cpp 2009-11-29 11:02:45 EST (Sun, 29 Nov 2009)
@@ -30,7 +30,7 @@
    check<unsigned int>();
    check<signed long>();
    check<unsigned long>();
-#ifdef BOOST_HAS_LONG_LONG
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
    check<boost::long_long_type>();
    check<boost::ulong_long_type>();
 #endif

Modified: trunk/libs/integer/test/integer_traits_test.cpp
==============================================================================
--- trunk/libs/integer/test/integer_traits_test.cpp (original)
+++ trunk/libs/integer/test/integer_traits_test.cpp 2009-11-29 11:02:45 EST (Sun, 29 Nov 2009)
@@ -85,7 +85,7 @@
   runtest("long", long());
   typedef unsigned long unsigned_long;
   runtest("unsigned long", unsigned_long());
-#if !defined(BOOST_NO_INT64_T) && (!defined(BOOST_MSVC) || BOOST_MSVC > 1300) && !defined(__BORLANDC__) && !defined(__BEOS__)
+#ifndef BOOST_NO_INTEGRAL_INT64_T
   //
   // MS/Borland compilers can't support 64-bit member constants
   // BeOS doesn't have specialisations for long long in SGI's <limits> header.


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk