Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59468 - in trunk/boost: . config/compiler
From: john_at_[hidden]
Date: 2010-02-04 06:15:55


Author: johnmaddock
Date: 2010-02-04 06:15:54 EST (Thu, 04 Feb 2010)
New Revision: 59468
URL: http://svn.boost.org/trac/boost/changeset/59468

Log:
Change integer code to still work when BOOST_HAS_MS_INT64 is defined but BOOST_HAS_LONG_LONG is not.
Update VC++ config to define BOOST_HAS_LONG_LONG for MSVC-8 in ANSI mode.
Fixes #3657.
Text files modified:
   trunk/boost/config/compiler/visualc.hpp | 2 +-
   trunk/boost/integer.hpp | 4 ++++
   trunk/boost/integer_fwd.hpp | 12 +++++++++---
   3 files changed, 14 insertions(+), 4 deletions(-)

Modified: trunk/boost/config/compiler/visualc.hpp
==============================================================================
--- trunk/boost/config/compiler/visualc.hpp (original)
+++ trunk/boost/config/compiler/visualc.hpp 2010-02-04 06:15:54 EST (Thu, 04 Feb 2010)
@@ -125,7 +125,7 @@
 #if (_MSC_VER >= 1200)
 # define BOOST_HAS_MS_INT64
 #endif
-#if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1500))
+#if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400))
 # define BOOST_HAS_LONG_LONG
 #else
 # define BOOST_NO_LONG_LONG

Modified: trunk/boost/integer.hpp
==============================================================================
--- trunk/boost/integer.hpp (original)
+++ trunk/boost/integer.hpp 2010-02-04 06:15:54 EST (Thu, 04 Feb 2010)
@@ -57,6 +57,8 @@
   // no specializations for 0 and 5: requests for a type > long are in error
 #ifdef BOOST_HAS_LONG_LONG
   template<> struct int_least_helper<1> { typedef boost::long_long_type least; };
+#elif defined(BOOST_HAS_MS_INT64)
+ template<> struct int_least_helper<1> { typedef __int64 least; };
 #endif
   template<> struct int_least_helper<2> { typedef long least; };
   template<> struct int_least_helper<3> { typedef int least; };
@@ -64,6 +66,8 @@
   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; };
+#elif defined(BOOST_HAS_MS_INT64)
+ template<> struct int_least_helper<6> { 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; };

Modified: trunk/boost/integer_fwd.hpp
==============================================================================
--- trunk/boost/integer_fwd.hpp (original)
+++ trunk/boost/integer_fwd.hpp 2010-02-04 06:15:54 EST (Thu, 04 Feb 2010)
@@ -77,12 +77,18 @@
 template < >
     class integer_traits< unsigned long >;
 
-#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && (defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64))
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG)
 template < >
- class integer_traits< ::boost::long_long_type>;
+class integer_traits< ::boost::long_long_type>;
 
 template < >
- class integer_traits< ::boost::ulong_long_type >;
+class integer_traits< ::boost::ulong_long_type >;
+#elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64)
+template < >
+class integer_traits<__int64>;
+
+template < >
+class integer_traits<unsigned __int64>;
 #endif
 
 


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