|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58291 - trunk/boost
From: john_at_[hidden]
Date: 2009-12-11 10:59:43
Author: johnmaddock
Date: 2009-12-11 10:59:42 EST (Fri, 11 Dec 2009)
New Revision: 58291
URL: http://svn.boost.org/trac/boost/changeset/58291
Log:
Extend codegear/borland fix.
Text files modified:
trunk/boost/integer.hpp | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
Modified: trunk/boost/integer.hpp
==============================================================================
--- trunk/boost/integer.hpp (original)
+++ trunk/boost/integer.hpp 2009-12-11 10:59:42 EST (Fri, 11 Dec 2009)
@@ -209,8 +209,9 @@
#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<unsigned long>::const_max) +
@@ -218,12 +219,21 @@
(MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
(MaxValue <= ::boost::integer_traits<unsigned char>::const_max));
typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
+#else // BOOST_NO_INTEGRAL_INT64_T
+ BOOST_STATIC_CONSTANT(unsigned, which =
+ 5 +
+ (MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
+ (MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
+ (MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
+ (MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
+ (MaxValue <= ::boost::integer_traits<unsigned char>::const_max));
+ typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::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<boost::ulong_long_type>::const_max) +
#else
1 +
#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