mirror of
https://github.com/boostorg/circular_buffer.git
synced 2026-02-03 09:02:12 +00:00
Compare commits
3 Commits
boost-1.35
...
boost-1.35
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
208c8206ad | ||
|
|
c3fcf1a048 | ||
|
|
683ca2a581 |
@@ -943,7 +943,8 @@ template <class T, class Alloc>
|
||||
</dt>
|
||||
<dd>
|
||||
This constructor has been defined only due to compatibility with the STL container definition. Avoid
|
||||
using it because it may allocate <b>very large</b> amount of memory.
|
||||
using it because it may allocate <b>very large</b> amount of memory (depending on allocator's
|
||||
max_size()).
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -3187,7 +3188,8 @@ template <class T, class Alloc>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995">max_size()</a></code>,
|
||||
<code><a href="#classboost_1_1circular__buffer_17e144e8c7acd8e30c08bfb03391a2338">reserve()</a></code>,
|
||||
<code><a href="#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize()</a></code>
|
||||
<code><a href="#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize(size_type,
|
||||
const_reference)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -3199,7 +3201,8 @@ template <class T, class Alloc>
|
||||
"#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> max_size()
|
||||
const;</b></code><br>
|
||||
<br>
|
||||
Get the largest possible size or capacity of the <code>circular_buffer</code>.
|
||||
Get the largest possible size or capacity of the <code>circular_buffer</code>. (It depends on allocator's
|
||||
max_size()).
|
||||
<dl>
|
||||
<dt>
|
||||
<b>Returns:</b>
|
||||
@@ -3490,7 +3493,7 @@ template <class T, class Alloc>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995">max_size()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity()</a></code>
|
||||
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity(capacity_type)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -3579,8 +3582,9 @@ template <class T, class Alloc>
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_1477715e9d31d2cc5b02ad8ecf3c68c46">rset_capacity()</a></code>,
|
||||
<code><a href="#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize()</a></code>
|
||||
"#classboost_1_1circular__buffer_1477715e9d31d2cc5b02ad8ecf3c68c46">rset_capacity(capacity_type)</a></code>,
|
||||
<code><a href="#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize(size_type,
|
||||
const_reference)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -3685,9 +3689,9 @@ template <class T, class Alloc>
|
||||
<b>See Also:</b>
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href="#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity()</a></code>
|
||||
<code><a href="#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize(size_type,
|
||||
const_reference)</a></code>, <code><a href=
|
||||
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity(capacity_type)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -3776,8 +3780,9 @@ template <class T, class Alloc>
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity()</a></code>,
|
||||
<code><a href="#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize()</a></code>
|
||||
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity(capacity_type)</a></code>,
|
||||
<code><a href="#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize(size_type,
|
||||
const_reference)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -3882,9 +3887,9 @@ template <class T, class Alloc>
|
||||
<b>See Also:</b>
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href="#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity()</a></code>
|
||||
<code><a href="#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize(size_type,
|
||||
const_reference)</a></code>, <code><a href=
|
||||
"#classboost_1_1circular__buffer_1477715e9d31d2cc5b02ad8ecf3c68c46">rset_capacity(capacity_type)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -4594,7 +4599,7 @@ template <class T, class Alloc>
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front()</a></code>,
|
||||
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front(const_reference)</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07">pop_back()</a></code>,
|
||||
<code><a href=
|
||||
@@ -4676,7 +4681,7 @@ template <class T, class Alloc>
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back()</a></code>,
|
||||
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back(const_reference)</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07">pop_back()</a></code>,
|
||||
<code><a href=
|
||||
@@ -4748,9 +4753,9 @@ template <class T, class Alloc>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_18ac972dc24ef7236faa1875de92b9dd8">pop_front()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back()</a></code>,
|
||||
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back(const_reference)</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front()</a></code>
|
||||
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front(const_reference)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -4818,9 +4823,9 @@ template <class T, class Alloc>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07">pop_back()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back()</a></code>,
|
||||
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back(const_reference)</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front()</a></code>
|
||||
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front(const_reference)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
|
||||
@@ -1194,7 +1194,8 @@ public:
|
||||
<code><a href=
|
||||
"circular_buffer.html#classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995">max_size()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity()</a></code>
|
||||
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity(const
|
||||
capacity_type&)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -1311,9 +1312,10 @@ public:
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_10f096c108ebde69ae83a9de41b3bea56">rset_capacity()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1f244ff5576b79f8d60e273c02d71c9f2">resize()</a></code>
|
||||
"#classboost_1_1circular__buffer__space__optimized_10f096c108ebde69ae83a9de41b3bea56">rset_capacity(const
|
||||
capacity_type&)</a></code>, <code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1f244ff5576b79f8d60e273c02d71c9f2">resize(size_type,
|
||||
const_reference)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -1423,9 +1425,10 @@ public:
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee">rresize()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity()</a></code>
|
||||
"#classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee">rresize(size_type,
|
||||
const_reference)</a></code>, <code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity(const
|
||||
capacity_type&)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -1523,9 +1526,10 @@ public:
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee">rresize()</a></code>
|
||||
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity(const
|
||||
capacity_type&)</a></code>, <code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee">rresize(size_type,
|
||||
const_reference)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -1635,9 +1639,10 @@ public:
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee">rresize()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity()</a></code>
|
||||
"#classboost_1_1circular__buffer__space__optimized_1f244ff5576b79f8d60e273c02d71c9f2">resize(size_type,
|
||||
const_reference)</a></code>, <code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_10f096c108ebde69ae83a9de41b3bea56">rset_capacity(const
|
||||
capacity_type&)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -2400,7 +2405,7 @@ public:
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front()</a></code>,
|
||||
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front(const_reference)</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_19c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>,
|
||||
<code><a href=
|
||||
@@ -2493,7 +2498,7 @@ public:
|
||||
</dt>
|
||||
<dd>
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205">push_back()</a></code>,
|
||||
"#classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205">push_back(const_reference)</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_19c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>,
|
||||
<code><a href=
|
||||
@@ -2570,9 +2575,9 @@ public:
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1d7d496c40fc053258ac7d19cf5261788">pop_front()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205">push_back()</a></code>,
|
||||
"#classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205">push_back(const_reference)</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front()</a></code>
|
||||
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front(const_reference)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
@@ -2645,9 +2650,9 @@ public:
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_19c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205">push_back()</a></code>,
|
||||
"#classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205">push_back(const_reference)</a></code>,
|
||||
<code><a href=
|
||||
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front()</a></code>
|
||||
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front(const_reference)</a></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</td>
|
||||
|
||||
@@ -679,12 +679,13 @@ public:
|
||||
Does not invalidate any iterators.
|
||||
\par Complexity
|
||||
Constant (in the size of the <code>circular_buffer</code>).
|
||||
\sa <code>capacity()</code>, <code>max_size()</code>, <code>reserve()</code>, <code>resize()</code>
|
||||
\sa <code>capacity()</code>, <code>max_size()</code>, <code>reserve()</code>,
|
||||
<code>\link resize() resize(size_type, const_reference)\endlink</code>
|
||||
*/
|
||||
size_type size() const { return m_size; }
|
||||
|
||||
//! Get the largest possible size or capacity of the <code>circular_buffer</code>.
|
||||
/*!
|
||||
/*! \brief Get the largest possible size or capacity of the <code>circular_buffer</code>. (It depends on
|
||||
allocator's %max_size()).
|
||||
\return The maximum size/capacity the <code>circular_buffer</code> can be set to.
|
||||
\throws Nothing.
|
||||
\par Exception Safety
|
||||
@@ -753,7 +754,8 @@ public:
|
||||
Does not invalidate any iterators.
|
||||
\par Complexity
|
||||
Constant (in the size of the <code>circular_buffer</code>).
|
||||
\sa <code>reserve()</code>, <code>size()</code>, <code>max_size()</code>, <code>set_capacity()</code>
|
||||
\sa <code>reserve()</code>, <code>size()</code>, <code>max_size()</code>,
|
||||
<code>set_capacity(capacity_type)</code>
|
||||
*/
|
||||
capacity_type capacity() const { return m_end - m_buff; }
|
||||
|
||||
@@ -774,7 +776,8 @@ public:
|
||||
<code>end()</code>) if the new capacity is different from the original.
|
||||
\par Complexity
|
||||
Linear (in <code>min[size(), new_capacity]</code>).
|
||||
\sa <code>rset_capacity()</code>, <code>resize()</code>
|
||||
\sa <code>rset_capacity(capacity_type)</code>,
|
||||
<code>\link resize() resize(size_type, const_reference)\endlink</code>
|
||||
*/
|
||||
void set_capacity(capacity_type new_capacity) {
|
||||
if (new_capacity == capacity())
|
||||
@@ -816,7 +819,8 @@ public:
|
||||
any iterator.
|
||||
\par Complexity
|
||||
Linear (in the new size of the <code>circular_buffer</code>).
|
||||
\sa <code>rresize()</code>, <code>set_capacity()</code>
|
||||
\sa <code>\link rresize() rresize(size_type, const_reference)\endlink</code>,
|
||||
<code>set_capacity(capacity_type)</code>
|
||||
*/
|
||||
void resize(size_type new_size, param_value_type item = value_type()) {
|
||||
if (new_size > size()) {
|
||||
@@ -846,7 +850,8 @@ public:
|
||||
<code>end()</code>) if the new capacity is different from the original.
|
||||
\par Complexity
|
||||
Linear (in <code>min[size(), new_capacity]</code>).
|
||||
\sa <code>set_capacity()</code>, <code>rresize()</code>
|
||||
\sa <code>set_capacity(capacity_type)</code>,
|
||||
<code>\link rresize() rresize(size_type, const_reference)\endlink</code>
|
||||
*/
|
||||
void rset_capacity(capacity_type new_capacity) {
|
||||
if (new_capacity == capacity())
|
||||
@@ -887,7 +892,8 @@ public:
|
||||
any iterator.
|
||||
\par Complexity
|
||||
Linear (in the new size of the <code>circular_buffer</code>).
|
||||
\sa <code>rresize()</code>, <code>set_capacity()</code>
|
||||
\sa <code>\link resize() resize(size_type, const_reference)\endlink</code>,
|
||||
<code>rset_capacity(capacity_type)</code>
|
||||
*/
|
||||
void rresize(size_type new_size, param_value_type item = value_type()) {
|
||||
if (new_size > size()) {
|
||||
@@ -910,7 +916,8 @@ public:
|
||||
\par Complexity
|
||||
Constant.
|
||||
\warning This constructor has been defined only due to compatibility with the STL container definition. Avoid
|
||||
using it because it may allocate <b>very large</b> amount of memory.
|
||||
using it because it may allocate <b>very large</b> amount of memory (depending on allocator's
|
||||
%max_size()).
|
||||
*/
|
||||
explicit circular_buffer(const allocator_type& alloc = allocator_type())
|
||||
: m_size(0), m_alloc(alloc) {
|
||||
@@ -1296,7 +1303,8 @@ public:
|
||||
Does not invalidate any iterators with the exception of iterators pointing to the overwritten element.
|
||||
\par Complexity
|
||||
Constant (in the size of the <code>circular_buffer</code>).
|
||||
\sa <code>push_front()</code>, <code>pop_back()</code>, <code>pop_front()</code>
|
||||
\sa <code>\link push_front() push_front(const_reference)\endlink</code>,
|
||||
<code>pop_back()</code>, <code>pop_front()</code>
|
||||
*/
|
||||
void push_back(param_value_type item = value_type()) {
|
||||
if (full()) {
|
||||
@@ -1325,7 +1333,8 @@ public:
|
||||
Does not invalidate any iterators with the exception of iterators pointing to the overwritten element.
|
||||
\par Complexity
|
||||
Constant (in the size of the <code>circular_buffer</code>).
|
||||
\sa <code>push_back()</code>, <code>pop_back()</code>, <code>pop_front()</code>
|
||||
\sa <code>\link push_back() push_back(const_reference)\endlink</code>,
|
||||
<code>pop_back()</code>, <code>pop_front()</code>
|
||||
*/
|
||||
void push_front(param_value_type item = value_type()) {
|
||||
BOOST_TRY {
|
||||
@@ -1358,7 +1367,8 @@ public:
|
||||
Invalidates only iterators pointing to the removed element.
|
||||
\par Complexity
|
||||
Constant (in the size of the <code>circular_buffer</code>).
|
||||
\sa <code>pop_front()</code>, <code>push_back()</code>, <code>push_front()</code>
|
||||
\sa <code>pop_front()</code>, <code>\link push_back() push_back(const_reference)\endlink</code>,
|
||||
<code>\link push_front() push_front(const_reference)\endlink</code>
|
||||
*/
|
||||
void pop_back() {
|
||||
BOOST_CB_ASSERT(!empty()); // check for empty buffer (back element not available)
|
||||
@@ -1378,7 +1388,8 @@ public:
|
||||
Invalidates only iterators pointing to the removed element.
|
||||
\par Complexity
|
||||
Constant (in the size of the <code>circular_buffer</code>).
|
||||
\sa <code>pop_back()</code>, <code>push_back()</code>, <code>push_front()</code>
|
||||
\sa <code>pop_back()</code>, <code>\link push_back() push_back(const_reference)\endlink</code>,
|
||||
<code>\link push_front() push_front(const_reference)\endlink</code>
|
||||
*/
|
||||
void pop_front() {
|
||||
BOOST_CB_ASSERT(!empty()); // check for empty buffer (front element not available)
|
||||
|
||||
@@ -227,9 +227,7 @@ public:
|
||||
//! Difference type.
|
||||
typedef typename base_iterator::difference_type difference_type;
|
||||
|
||||
#if !defined(BOOST_CB_TEST) && BOOST_CB_ENABLE_DEBUG == 0
|
||||
private:
|
||||
#endif
|
||||
public:
|
||||
// Member variables
|
||||
|
||||
//! The circular buffer where the iterator points to.
|
||||
|
||||
@@ -150,7 +150,8 @@ public:
|
||||
Does not invalidate any iterators.
|
||||
\par Complexity
|
||||
Constant (in the size of the <code>circular_buffer_space_optimized</code>).
|
||||
\sa <code>reserve()</code>, <code>size()</code>, <code>max_size()</code>, <code>set_capacity()</code>
|
||||
\sa <code>reserve()</code>, <code>size()</code>, <code>max_size()</code>,
|
||||
<code>set_capacity(const capacity_type&)</code>
|
||||
*/
|
||||
const capacity_type& capacity() const { return m_capacity_ctrl; }
|
||||
|
||||
@@ -191,7 +192,8 @@ public:
|
||||
boost::%circular_buffer_space_optimized\<int\>(cb).swap(cb);</code><br><br>
|
||||
For more information about the shrink-to-fit technique in STL see
|
||||
<a href="http://www.gotw.ca/gotw/054.htm">http://www.gotw.ca/gotw/054.htm</a>.
|
||||
\sa <code>rset_capacity()</code>, <code>resize()</code>
|
||||
\sa <code>rset_capacity(const capacity_type&)</code>,
|
||||
<code>\link resize() resize(size_type, const_reference)\endlink</code>
|
||||
*/
|
||||
void set_capacity(const capacity_type& capacity_ctrl) {
|
||||
m_capacity_ctrl = capacity_ctrl;
|
||||
@@ -226,7 +228,8 @@ public:
|
||||
equal to <code>end()</code>).
|
||||
\par Complexity
|
||||
Linear (in the new size of the <code>circular_buffer_space_optimized</code>).
|
||||
\sa <code>rresize()</code>, <code>set_capacity()</code>
|
||||
\sa <code>\link rresize() rresize(size_type, const_reference)\endlink</code>,
|
||||
<code>set_capacity(const capacity_type&)</code>
|
||||
*/
|
||||
void resize(size_type new_size, param_value_type item = value_type()) {
|
||||
if (new_size > size()) {
|
||||
@@ -260,7 +263,8 @@ public:
|
||||
equal to <code>end()</code>).
|
||||
\par Complexity
|
||||
Linear (in <code>min[size(), capacity_ctrl.%capacity()]</code>).
|
||||
\sa <code>set_capacity()</code>, <code>rresize()</code>
|
||||
\sa <code>set_capacity(const capacity_type&)</code>,
|
||||
<code>\link rresize() rresize(size_type, const_reference)\endlink</code>
|
||||
*/
|
||||
void rset_capacity(const capacity_type& capacity_ctrl) {
|
||||
m_capacity_ctrl = capacity_ctrl;
|
||||
@@ -295,7 +299,8 @@ public:
|
||||
equal to <code>end()</code>).
|
||||
\par Complexity
|
||||
Linear (in the new size of the <code>circular_buffer_space_optimized</code>).
|
||||
\sa <code>rresize()</code>, <code>set_capacity()</code>
|
||||
\sa <code>\link resize() resize(size_type, const_reference)\endlink</code>,
|
||||
<code>rset_capacity(const capacity_type&)</code>
|
||||
*/
|
||||
void rresize(size_type new_size, param_value_type item = value_type()) {
|
||||
if (new_size > size()) {
|
||||
@@ -717,7 +722,8 @@ public:
|
||||
equal to <code>end()</code>).
|
||||
\par Complexity
|
||||
Linear (in the size of the <code>circular_buffer_space_optimized</code>).
|
||||
\sa <code>push_front()</code>, <code>pop_back()</code>, <code>pop_front()</code>
|
||||
\sa <code>\link push_front() push_front(const_reference)\endlink</code>, <code>pop_back()</code>,
|
||||
<code>pop_front()</code>
|
||||
*/
|
||||
void push_back(param_value_type item = value_type()) {
|
||||
check_low_capacity();
|
||||
@@ -741,7 +747,8 @@ public:
|
||||
equal to <code>end()</code>).
|
||||
\par Complexity
|
||||
Linear (in the size of the <code>circular_buffer_space_optimized</code>).
|
||||
\sa <code>push_back()</code>, <code>pop_back()</code>, <code>pop_front()</code>
|
||||
\sa <code>\link push_back() push_back(const_reference)\endlink</code>, <code>pop_back()</code>,
|
||||
<code>pop_front()</code>
|
||||
*/
|
||||
void push_front(param_value_type item = value_type()) {
|
||||
check_low_capacity();
|
||||
@@ -762,7 +769,8 @@ public:
|
||||
equal to <code>end()</code>).
|
||||
\par Complexity
|
||||
Linear (in the size of the <code>circular_buffer_space_optimized</code>).
|
||||
\sa <code>pop_front()</code>, <code>push_back()</code>, <code>push_front()</code>
|
||||
\sa <code>pop_front()</code>, <code>\link push_back() push_back(const_reference)\endlink</code>,
|
||||
<code>\link push_front() push_front(const_reference)\endlink</code>
|
||||
*/
|
||||
void pop_back() {
|
||||
circular_buffer<T, Alloc>::pop_back();
|
||||
@@ -783,7 +791,8 @@ public:
|
||||
equal to <code>end()</code>).
|
||||
\par Complexity
|
||||
Linear (in the size of the <code>circular_buffer_space_optimized</code>).
|
||||
\sa <code>pop_back()</code>, <code>push_back()</code>, <code>push_front()</code>
|
||||
\sa <code>pop_back()</code>, <code>\link push_back() push_back(const_reference)\endlink</code>,
|
||||
<code>\link push_front() push_front(const_reference)\endlink</code>
|
||||
*/
|
||||
void pop_front() {
|
||||
circular_buffer<T, Alloc>::pop_front();
|
||||
|
||||
Reference in New Issue
Block a user