mirror of
https://github.com/boostorg/dynamic_bitset.git
synced 2026-01-19 04:12:09 +00:00
Add test_set() (#6164).
This commit is contained in:
@@ -202,6 +202,7 @@ public:
|
||||
dynamic_bitset& <a href="#flip2">flip</a>(size_type n);
|
||||
dynamic_bitset& <a href="#flip1">flip</a>();
|
||||
bool <a href="#test">test</a>(size_type n) const;
|
||||
bool <a href="#test">test_set</a>(size_type n, bool val = true);
|
||||
bool <a href="#all">all</a>() const;
|
||||
bool <a href="#any">any</a>() const;
|
||||
bool <a href="#none">none</a>() const;
|
||||
@@ -1159,6 +1160,18 @@ bool <a id="test">test</a>(size_type n) const
|
||||
<b>Returns:</b> <tt>true</tt> if bit <tt>n</tt> is set and
|
||||
<tt>false</tt> is bit <tt>n</tt> is 0.
|
||||
|
||||
<hr />
|
||||
<pre>
|
||||
bool <a id="test">test_set</a>(size_type n, bool val = true)
|
||||
</pre>
|
||||
|
||||
<b>Precondition:</b> <tt>n < this->size()</tt>.<br />
|
||||
<b>Effects:</b> Sets bit <tt>n</tt> if <tt>val</tt> is
|
||||
<tt>true</tt>, and clears bit <tt>n</tt> if <tt>val</tt> is
|
||||
<tt>false</tt>. <br />
|
||||
<b>Returns:</b> <tt>true</tt> if the previous state of bit
|
||||
<tt>n</tt> was set and <tt>false</tt> is bit <tt>n</tt> is 0.
|
||||
|
||||
<hr />
|
||||
<pre>
|
||||
reference <a id="bracket">operator[]</a>(size_type n)
|
||||
|
||||
Reference in New Issue
Block a user