From 4f465266f8b4d9e490f225d3006af31e3d439c7b Mon Sep 17 00:00:00 2001 From: danieljames Date: Sat, 16 May 2009 14:58:33 +0000 Subject: [PATCH] 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 ------------------------------------------------------------------------ git-svn-id: https://svn.boost.org/svn/boost/trunk@53050 b8fc166d-592f-0410-95f2-cb63ce0dd405 --- boost/dynamic_bitset/dynamic_bitset.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/boost/dynamic_bitset/dynamic_bitset.hpp b/boost/dynamic_bitset/dynamic_bitset.hpp index 8728003de4..72faa8d192 100644 --- a/boost/dynamic_bitset/dynamic_bitset.hpp +++ b/boost/dynamic_bitset/dynamic_bitset.hpp @@ -1002,23 +1002,23 @@ dynamic_bitset::count() const #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::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 *>(0)); + static_cast *>(0)); } -- 2.11.4.GIT