Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52960 - branches/release/boost/dynamic_bitset
From: dgregor_at_[hidden]
Date: 2009-05-13 02:11:04


Author: dgregor
Date: 2009-05-13 02:11:03 EDT (Wed, 13 May 2009)
New Revision: 52960
URL: http://svn.boost.org/trac/boost/changeset/52960

Log:
Use enum constants rather than local variables for integral constants. Should fix dynamic_bitset failures on GCC 4.3.x
Text files modified:
   branches/release/boost/dynamic_bitset/dynamic_bitset.hpp | 12 ++++++------
   1 files changed, 6 insertions(+), 6 deletions(-)

Modified: branches/release/boost/dynamic_bitset/dynamic_bitset.hpp
==============================================================================
--- branches/release/boost/dynamic_bitset/dynamic_bitset.hpp (original)
+++ branches/release/boost/dynamic_bitset/dynamic_bitset.hpp 2009-05-13 02:11:03 EDT (Wed, 13 May 2009)
@@ -1001,18 +1001,18 @@
 
     // 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) };
 
- 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