Compare commits

..

1 Commits

Author SHA1 Message Date
Beman Dawes
0cd2872e85 Release 1.37.0
[SVN r49549]
2008-11-03 12:44:25 +00:00
2 changed files with 28 additions and 22 deletions

View File

@@ -20,13 +20,19 @@
# define BOOST_OLD_IOSTREAMS
#endif
// this should be in the config system some day
// see http://lists.boost.org/MailArchives/boost/msg62291.php
#define BOOST_DYNAMIC_BITSET_GNUC_VERSION ( (__GNUC__) * 100 * 100 \
+ (__GNUC_MINOR__) * 100)
// no-op function to workaround gcc bug c++/8419
//
namespace boost { namespace detail {
template <typename T> T make_non_const(T t) { return t; }
}}
#if defined(__GNUC__)
#if defined(__GNUC__) && BOOST_WORKAROUND(BOOST_DYNAMIC_BITSET_GNUC_VERSION, \
BOOST_TESTED_AT(30300))
# define BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(expr) \
(boost::detail::make_non_const(expr))
#else

View File

@@ -476,18 +476,24 @@ BOOST_DYNAMIC_BITSET_PRIVATE:
};
#if !defined BOOST_NO_INCLASS_MEMBER_INITIALIZATION
#if defined(__IBMCPP__) && BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
template <typename Block, typename Allocator>
const typename dynamic_bitset<Block, Allocator>::block_width_type
// Workaround for IBM's AIX platform.
// See http://comments.gmane.org/gmane.comp.lib.boost.user/15331
//
// NOTE:
// The compiler is actually right, until core issue 454 will be settled:
// <http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_active.html#454>
//
// It's arguable whether we want to mark this with BOOST_WORKAROUND or not.
template<typename Block, typename Allocator>
dynamic_bitset<Block, Allocator>::block_width_type const
dynamic_bitset<Block, Allocator>::bits_per_block;
template <typename Block, typename Allocator>
const typename dynamic_bitset<Block, Allocator>::size_type
dynamic_bitset<Block, Allocator>::npos;
template <typename Block, typename Allocator>
const typename dynamic_bitset<Block, Allocator>::block_width_type
template<typename Block, typename Allocator>
dynamic_bitset<Block, Allocator>::block_width_type const
dynamic_bitset<Block, Allocator>::ulong_width;
#endif
@@ -999,26 +1005,20 @@ dynamic_bitset<Block, Allocator>::count() const
using detail::dynamic_bitset_impl::access_by_blocks;
using detail::dynamic_bitset_impl::value_to_type;
#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
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
enum { no_padding =
const bool no_padding =
dynamic_bitset<Block, Allocator>::bits_per_block
== CHAR_BIT * sizeof(Block) };
#endif
== CHAR_BIT * sizeof(Block);
enum { enough_table_width = table_width >= CHAR_BIT };
const bool enough_table_width = table_width >= CHAR_BIT;
enum { mode = (no_padding && enough_table_width)
const bool 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<(bool)mode> *>(0));
static_cast<value_to_type<mode> *>(0));
}