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.

[SVN r59468]
This commit is contained in:
John Maddock
2010-02-04 11:15:54 +00:00
parent 2f13159023
commit a5356bb254
2 changed files with 13 additions and 3 deletions

View File

@ -57,6 +57,8 @@ namespace boost
// no specializations for 0 and 5: requests for a type > long are in error // no specializations for 0 and 5: requests for a type > long are in error
#ifdef BOOST_HAS_LONG_LONG #ifdef BOOST_HAS_LONG_LONG
template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; 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 #endif
template<> struct int_least_helper<2> { typedef long least; }; template<> struct int_least_helper<2> { typedef long least; };
template<> struct int_least_helper<3> { typedef int least; }; template<> struct int_least_helper<3> { typedef int least; };
@ -64,6 +66,8 @@ namespace boost
template<> struct int_least_helper<5> { typedef signed char least; }; template<> struct int_least_helper<5> { typedef signed char least; };
#ifdef BOOST_HAS_LONG_LONG #ifdef BOOST_HAS_LONG_LONG
template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; }; 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 #endif
template<> struct int_least_helper<7> { typedef unsigned long least; }; 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<8> { typedef unsigned int least; };

View File

@ -77,12 +77,18 @@ template < >
template < > template < >
class integer_traits< unsigned long >; 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 < > template < >
class integer_traits< ::boost::long_long_type>; class integer_traits< ::boost::long_long_type>;
template < > 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 #endif