Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58113 - trunk/boost
From: john_at_[hidden]
Date: 2009-12-03 07:14:16


Author: johnmaddock
Date: 2009-12-03 07:14:15 EST (Thu, 03 Dec 2009)
New Revision: 58113
URL: http://svn.boost.org/trac/boost/changeset/58113

Log:
Tentative Borland/Codegear patch.
Text files modified:
   trunk/boost/integer.hpp | 11 +++++++++++
   1 files changed, 11 insertions(+), 0 deletions(-)

Modified: trunk/boost/integer.hpp
==============================================================================
--- trunk/boost/integer.hpp (original)
+++ trunk/boost/integer.hpp 2009-12-03 07:14:15 EST (Thu, 03 Dec 2009)
@@ -126,6 +126,16 @@
   template< int Bits > // bits required
   struct uint_t : public detail::exact_unsigned_base_helper<Bits>
   {
+#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T)
+ // It's really not clear why this workaround should be needed... shrug I guess! JM
+ BOOST_STATIC_CONSTANT(int, s =
+ 6 +
+ (Bits <= ::std::numeric_limits<unsigned long>::digits) +
+ (Bits <= ::std::numeric_limits<unsigned int>::digits) +
+ (Bits <= ::std::numeric_limits<unsigned short>::digits) +
+ (Bits <= ::std::numeric_limits<unsigned char>::digits));
+ typedef typename detail::int_least_helper< ::boost::uint_t<Bits>::s>::least least;
+#else
       typedef typename detail::int_least_helper
         <
           5 +
@@ -139,6 +149,7 @@
           (Bits <= ::std::numeric_limits<unsigned short>::digits) +
           (Bits <= ::std::numeric_limits<unsigned char>::digits)
>::least least;
+#endif
       typedef typename int_fast_t<least>::type fast;
       // int_fast_t<> works correctly for unsigned too, in spite of the name.
   };


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