From 86519e7bcf8e3b5566aee5843922611a8a663d05 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 11 Dec 2009 15:59:42 +0000 Subject: [PATCH] Extend codegear/borland fix. [SVN r58291] --- include/boost/integer.hpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/include/boost/integer.hpp b/include/boost/integer.hpp index 275fe5d..69a3318 100644 --- a/include/boost/integer.hpp +++ b/include/boost/integer.hpp @@ -209,8 +209,9 @@ namespace boost #endif struct uint_value_t { -#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T) +#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) // It's really not clear why this workaround should be needed... shrug I guess! JM +#if defined(BOOST_NO_INTEGRAL_INT64_T) BOOST_STATIC_CONSTANT(unsigned, which = 6 + (MaxValue <= ::boost::integer_traits::const_max) + @@ -218,12 +219,21 @@ namespace boost (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max)); typedef typename detail::int_least_helper< ::boost::uint_value_t::which>::least least; +#else // BOOST_NO_INTEGRAL_INT64_T + BOOST_STATIC_CONSTANT(unsigned, which = + 5 + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max)); + typedef typename detail::int_least_helper< ::boost::uint_value_t::which>::least least; +#endif // BOOST_NO_INTEGRAL_INT64_T #else typedef typename detail::int_least_helper < 5 + #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) - (MaxValue <= ::boost::integer_traits::const_max) + #else 1 + #endif