Compare commits

...

2 Commits

Author SHA1 Message Date
Beman Dawes
1b241db6ec Release 1.46.0
[SVN r69125]
2011-02-21 18:42:22 +00:00
Steven Watanabe
e6fc8e8ec9 Merge dynamic_bitset from the trunk
[SVN r67617]
2011-01-03 16:38:46 +00:00
3 changed files with 18 additions and 4 deletions

View File

@@ -71,8 +71,8 @@ void run_numeric_ctor_tests( BOOST_EXPLICIT_TEMPLATE_TYPE(Tests)
};
const T numbers[] = {
T(-1), T(-3), T(-8), T(-15), mi/2, mi,
0, 1, 3, 8, 15, ma/2, ma
T(-1), T(-3), T(-8), T(-15), T(mi/2), T(mi),
T(0), T(1), T(3), T(8), T(15), T(ma/2), T(ma)
};
for (std::size_t s = 0; s < BOOST_BITSET_TEST_COUNT(sizes); ++s) {

View File

@@ -212,6 +212,7 @@ public:
bool <a href="#is_subset_of">is_subset_of</a>(const dynamic_bitset&amp; a) const;
bool <a href="#is_proper_subset_of">is_proper_subset_of</a>(const dynamic_bitset&amp; a) const;
bool <a href="#intersects">intersects</a>(const dynamic_bitset&amp; a) const;
size_type <a href="#find_first">find_first</a>() const;
size_type <a href="#find_next">find_next</a>(size_type pos) const;
@@ -1174,6 +1175,19 @@ also set and if <tt>this-&gt;count() &lt; a.count()</tt>.
Otherwise this function returns false.<br />
<b>Throws:</b> nothing.
<hr />
<pre>
bool <a id=
"intersects">intersects</a>(const dynamic_bitset&amp; a) const
</pre>
<b>Requires:</b> <tt>this-&gt;size() == a.size()</tt><br />
<b>Returns:</b> true if this bitset and <tt>a</tt> intersect.
That is, it returns true if, there is a bit which is set in this
bitset, such that the corresponding bit in bitset <tt>a</tt> is
also set. Otherwise this function returns false.<br />
<b>Throws:</b> nothing.
<hr />
<pre>
size_type <a id = "find_first">find_first</a>() const;

View File

@@ -54,7 +54,7 @@ class dynamic_bitset
// of VC++ are likely able to digest a more drinking form of the
// code; but changing it now is probably not worth the risks...]
BOOST_STATIC_ASSERT(detail::dynamic_bitset_impl::allowed_block_type<Block>::value);
BOOST_STATIC_ASSERT((bool)detail::dynamic_bitset_impl::allowed_block_type<Block>::value);
public:
typedef Block block_type;
@@ -670,7 +670,7 @@ resize(size_type num_bits, bool value) // strong guarantee
if (value && (num_bits > m_num_bits)) {
const size_type extra_bits = count_extra_bits();
const block_width_type extra_bits = count_extra_bits();
if (extra_bits) {
assert(old_num_blocks >= 1 && old_num_blocks <= m_bits.size());