Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57863 - trunk/boost
From: john_at_[hidden]
Date: 2009-11-23 08:23:16


Author: johnmaddock
Date: 2009-11-23 08:23:15 EST (Mon, 23 Nov 2009)
New Revision: 57863
URL: http://svn.boost.org/trac/boost/changeset/57863

Log:
Add support for MS style __int64 when long long is not available.
Fixes #3084.
Text files modified:
   trunk/boost/integer_fwd.hpp | 2 +-
   trunk/boost/integer_traits.hpp | 14 ++++++++++++++
   2 files changed, 15 insertions(+), 1 deletions(-)

Modified: trunk/boost/integer_fwd.hpp
==============================================================================
--- trunk/boost/integer_fwd.hpp (original)
+++ trunk/boost/integer_fwd.hpp 2009-11-23 08:23:15 EST (Mon, 23 Nov 2009)
@@ -65,7 +65,7 @@
 template < >
     class integer_traits< unsigned long >;
 
-#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && (defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64))
 template < >
     class integer_traits< ::boost::long_long_type>;
 

Modified: trunk/boost/integer_traits.hpp
==============================================================================
--- trunk/boost/integer_traits.hpp (original)
+++ trunk/boost/integer_traits.hpp 2009-11-23 08:23:15 EST (Mon, 23 Nov 2009)
@@ -236,6 +236,20 @@
     public detail::integer_traits_base< ::boost::ulong_long_type, 0, ~0uLL>
 { };
 
+#elif defined(BOOST_HAS_MS_INT64)
+
+template<>
+class integer_traits< __int64>
+ : public std::numeric_limits< __int64>,
+ public detail::integer_traits_base< __int64, _I64_MIN, _I64_MAX>
+{ };
+
+template<>
+class integer_traits< unsigned __int64>
+ : public std::numeric_limits< unsigned __int64>,
+ public detail::integer_traits_base< unsigned __int64, 0, _UI64_MAX>
+{ };
+
 #endif
 #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