Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53050 - trunk/boost/dynamic_bitset
From: daniel_james_at_[hidden]
Date: 2009-05-16 10:58:33


Author: danieljames
Date: 2009-05-16 10:58:33 EDT (Sat, 16 May 2009)
New Revision: 53050
URL: http://svn.boost.org/trac/boost/changeset/53050

Log:
Merge dynamic bitset from release.

I think the recent changes in trunk and release were for the same problem. But
I'm not sure so I've merged them together. Hopefully, the release branch might
fix the Intel C++ errors as well.

------------------------------------------------------------------------
r52960 | dgregor | 2009-05-13 07:11:03 +0100 (Wed, 13 May 2009) | 1 line

Use enum constants rather than local variables for integral constants. Should fix dynamic_bitset failures on GCC 4.3.x
------------------------------------------------------------------------

Text files modified:
   trunk/boost/dynamic_bitset/dynamic_bitset.hpp | 14 +++++++-------
   1 files changed, 7 insertions(+), 7 deletions(-)

Modified: trunk/boost/dynamic_bitset/dynamic_bitset.hpp
==============================================================================
--- trunk/boost/dynamic_bitset/dynamic_bitset.hpp (original)
+++ trunk/boost/dynamic_bitset/dynamic_bitset.hpp 2009-05-16 10:58:33 EDT (Sat, 16 May 2009)
@@ -1002,23 +1002,23 @@
 #if BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ == 3) && (__GNUC_PATCHLEVEL__ == 3)
     // NOTE: Explicit qualification of "bits_per_block"
     // breaks compilation on gcc 4.3.3
- const bool no_padding = bits_per_block == CHAR_BIT * sizeof(Block);
+ enum { no_padding = bits_per_block == CHAR_BIT * sizeof(Block) };
 #else
     // NOTE: Explicitly qualifying "bits_per_block" to workaround
     // regressions of gcc 3.4.x
- const bool no_padding =
+ enum { no_padding =
         dynamic_bitset<Block, Allocator>::bits_per_block
- == CHAR_BIT * sizeof(Block);
+ == CHAR_BIT * sizeof(Block) };
 #endif
 
- const bool enough_table_width = table_width >= CHAR_BIT;
+ enum { enough_table_width = table_width >= CHAR_BIT };
 
- const bool mode = (no_padding && enough_table_width)
+ enum { mode = (no_padding && enough_table_width)
                           ? access_by_bytes
- : access_by_blocks;
+ : access_by_blocks };
 
     return do_count(m_bits.begin(), num_blocks(), Block(0),
- static_cast<value_to_type<mode> *>(0));
+ static_cast<value_to_type<(bool)mode> *>(0));
 }
 
 


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