Patch by Riccardo Marcangelo: Added a pop_back() member function which decreases the size of the bitset by one

This commit is contained in:
Marshall Clow
2014-09-15 08:29:05 -07:00
parent b151c97fd2
commit 225064d355
4 changed files with 63 additions and 0 deletions

View File

@@ -180,6 +180,7 @@ public:
void <a href=
"#resize">resize</a>(size_type num_bits, bool value = false);
void <a href="#clear">clear</a>();
void <a href="#pop_back">pop_back</a>();
void <a href="#push_back">push_back</a>(bool bit);
void <a href="#append1">append</a>(Block block);
@@ -834,6 +835,15 @@ void <a id="clear">clear</a>()
<b>Effects:</b> The size of the bitset becomes zero.<br />
<b>Throws:</b> nothing.
<hr />
<pre>
void <a id="pop_back">pop_back</a>();
</pre>
<b>Precondition:</b> <tt>!this-&gt;empty()</tt>.<br />
<b>Effects:</b> Decreases the size of the bitset by one.<br />
<b>Throws:</b> nothing.
<hr />
<pre>
void <a id="push_back">push_back</a>(bool value);