Compare commits

..

1 Commits

Author SHA1 Message Date
Beman Dawes
52ed9f6133 1.35.0 Release Candidate 1
[SVN r43603]
2008-03-14 14:45:55 +00:00
5 changed files with 64 additions and 92 deletions

View File

@@ -943,8 +943,7 @@ 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 (depending on allocator's
max_size()).
using it because it may allocate <b>very large</b> amount of memory.
</dd>
</dl>
</td>
@@ -3188,8 +3187,7 @@ template &lt;class T, class Alloc&gt;
<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(size_type,
const_reference)</a></code>
<code><a href="#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize()</a></code>
</dd>
</dl>
</td>
@@ -3201,8 +3199,7 @@ template &lt;class T, class Alloc&gt;
"#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>. (It depends on allocator's
max_size()).
Get the largest possible size or capacity of the <code>circular_buffer</code>.
<dl>
<dt>
<b>Returns:</b>
@@ -3493,7 +3490,7 @@ template &lt;class T, class Alloc&gt;
<code><a href=
"#classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995">max_size()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity(capacity_type)</a></code>
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity()</a></code>
</dd>
</dl>
</td>
@@ -3582,9 +3579,8 @@ template &lt;class T, class Alloc&gt;
</dt>
<dd>
<code><a href=
"#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>
"#classboost_1_1circular__buffer_1477715e9d31d2cc5b02ad8ecf3c68c46">rset_capacity()</a></code>,
<code><a href="#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize()</a></code>
</dd>
</dl>
</td>
@@ -3689,9 +3685,9 @@ template &lt;class T, class Alloc&gt;
<b>See Also:</b>
</dt>
<dd>
<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>
<code><a href="#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity()</a></code>
</dd>
</dl>
</td>
@@ -3780,9 +3776,8 @@ template &lt;class T, class Alloc&gt;
</dt>
<dd>
<code><a href=
"#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>
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity()</a></code>,
<code><a href="#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize()</a></code>
</dd>
</dl>
</td>
@@ -3887,9 +3882,9 @@ template &lt;class T, class Alloc&gt;
<b>See Also:</b>
</dt>
<dd>
<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>
<code><a href="#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity()</a></code>
</dd>
</dl>
</td>
@@ -4599,7 +4594,7 @@ template &lt;class T, class Alloc&gt;
</dt>
<dd>
<code><a href=
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front(const_reference)</a></code>,
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07">pop_back()</a></code>,
<code><a href=
@@ -4681,7 +4676,7 @@ template &lt;class T, class Alloc&gt;
</dt>
<dd>
<code><a href=
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back(const_reference)</a></code>,
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07">pop_back()</a></code>,
<code><a href=
@@ -4753,9 +4748,9 @@ template &lt;class T, class Alloc&gt;
<code><a href=
"#classboost_1_1circular__buffer_18ac972dc24ef7236faa1875de92b9dd8">pop_front()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back(const_reference)</a></code>,
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front(const_reference)</a></code>
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front()</a></code>
</dd>
</dl>
</td>
@@ -4823,9 +4818,9 @@ template &lt;class T, class Alloc&gt;
<code><a href=
"#classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07">pop_back()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back(const_reference)</a></code>,
"#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front(const_reference)</a></code>
"#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front()</a></code>
</dd>
</dl>
</td>

View File

@@ -1194,8 +1194,7 @@ 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(const
capacity_type&amp;)</a></code>
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity()</a></code>
</dd>
</dl>
</td>
@@ -1312,10 +1311,9 @@ public:
</dt>
<dd>
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_10f096c108ebde69ae83a9de41b3bea56">rset_capacity(const
capacity_type&amp;)</a></code>, <code><a href=
"#classboost_1_1circular__buffer__space__optimized_1f244ff5576b79f8d60e273c02d71c9f2">resize(size_type,
const_reference)</a></code>
"#classboost_1_1circular__buffer__space__optimized_10f096c108ebde69ae83a9de41b3bea56">rset_capacity()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_1f244ff5576b79f8d60e273c02d71c9f2">resize()</a></code>
</dd>
</dl>
</td>
@@ -1425,10 +1423,9 @@ public:
</dt>
<dd>
<code><a href=
"#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&amp;)</a></code>
"#classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee">rresize()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity()</a></code>
</dd>
</dl>
</td>
@@ -1526,10 +1523,9 @@ public:
</dt>
<dd>
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity(const
capacity_type&amp;)</a></code>, <code><a href=
"#classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee">rresize(size_type,
const_reference)</a></code>
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee">rresize()</a></code>
</dd>
</dl>
</td>
@@ -1639,10 +1635,9 @@ public:
</dt>
<dd>
<code><a href=
"#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&amp;)</a></code>
"#classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee">rresize()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity()</a></code>
</dd>
</dl>
</td>
@@ -2405,7 +2400,7 @@ public:
</dt>
<dd>
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front(const_reference)</a></code>,
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_19c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>,
<code><a href=
@@ -2498,7 +2493,7 @@ public:
</dt>
<dd>
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205">push_back(const_reference)</a></code>,
"#classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205">push_back()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_19c4290c18ab3dd2462dc01fb8368dff6">pop_back()</a></code>,
<code><a href=
@@ -2575,9 +2570,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(const_reference)</a></code>,
"#classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205">push_back()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front(const_reference)</a></code>
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front()</a></code>
</dd>
</dl>
</td>
@@ -2650,9 +2645,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(const_reference)</a></code>,
"#classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205">push_back()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front(const_reference)</a></code>
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front()</a></code>
</dd>
</dl>
</td>

View File

@@ -679,13 +679,12 @@ 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>\link resize() resize(size_type, const_reference)\endlink</code>
\sa <code>capacity()</code>, <code>max_size()</code>, <code>reserve()</code>, <code>resize()</code>
*/
size_type size() const { return m_size; }
/*! \brief Get the largest possible size or capacity of the <code>circular_buffer</code>. (It depends on
allocator's %max_size()).
//! Get the largest possible size or capacity of the <code>circular_buffer</code>.
/*!
\return The maximum size/capacity the <code>circular_buffer</code> can be set to.
\throws Nothing.
\par Exception Safety
@@ -754,8 +753,7 @@ 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(capacity_type)</code>
\sa <code>reserve()</code>, <code>size()</code>, <code>max_size()</code>, <code>set_capacity()</code>
*/
capacity_type capacity() const { return m_end - m_buff; }
@@ -776,8 +774,7 @@ 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(capacity_type)</code>,
<code>\link resize() resize(size_type, const_reference)\endlink</code>
\sa <code>rset_capacity()</code>, <code>resize()</code>
*/
void set_capacity(capacity_type new_capacity) {
if (new_capacity == capacity())
@@ -819,8 +816,7 @@ public:
any iterator.
\par Complexity
Linear (in the new size of the <code>circular_buffer</code>).
\sa <code>\link rresize() rresize(size_type, const_reference)\endlink</code>,
<code>set_capacity(capacity_type)</code>
\sa <code>rresize()</code>, <code>set_capacity()</code>
*/
void resize(size_type new_size, param_value_type item = value_type()) {
if (new_size > size()) {
@@ -850,8 +846,7 @@ 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(capacity_type)</code>,
<code>\link rresize() rresize(size_type, const_reference)\endlink</code>
\sa <code>set_capacity()</code>, <code>rresize()</code>
*/
void rset_capacity(capacity_type new_capacity) {
if (new_capacity == capacity())
@@ -892,8 +887,7 @@ public:
any iterator.
\par Complexity
Linear (in the new size of the <code>circular_buffer</code>).
\sa <code>\link resize() resize(size_type, const_reference)\endlink</code>,
<code>rset_capacity(capacity_type)</code>
\sa <code>rresize()</code>, <code>set_capacity()</code>
*/
void rresize(size_type new_size, param_value_type item = value_type()) {
if (new_size > size()) {
@@ -916,8 +910,7 @@ 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 (depending on allocator's
%max_size()).
using it because it may allocate <b>very large</b> amount of memory.
*/
explicit circular_buffer(const allocator_type& alloc = allocator_type())
: m_size(0), m_alloc(alloc) {
@@ -1303,8 +1296,7 @@ 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>\link push_front() push_front(const_reference)\endlink</code>,
<code>pop_back()</code>, <code>pop_front()</code>
\sa <code>push_front()</code>, <code>pop_back()</code>, <code>pop_front()</code>
*/
void push_back(param_value_type item = value_type()) {
if (full()) {
@@ -1333,8 +1325,7 @@ 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>\link push_back() push_back(const_reference)\endlink</code>,
<code>pop_back()</code>, <code>pop_front()</code>
\sa <code>push_back()</code>, <code>pop_back()</code>, <code>pop_front()</code>
*/
void push_front(param_value_type item = value_type()) {
BOOST_TRY {
@@ -1367,8 +1358,7 @@ 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>\link push_back() push_back(const_reference)\endlink</code>,
<code>\link push_front() push_front(const_reference)\endlink</code>
\sa <code>pop_front()</code>, <code>push_back()</code>, <code>push_front()</code>
*/
void pop_back() {
BOOST_CB_ASSERT(!empty()); // check for empty buffer (back element not available)
@@ -1388,8 +1378,7 @@ 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>\link push_back() push_back(const_reference)\endlink</code>,
<code>\link push_front() push_front(const_reference)\endlink</code>
\sa <code>pop_back()</code>, <code>push_back()</code>, <code>push_front()</code>
*/
void pop_front() {
BOOST_CB_ASSERT(!empty()); // check for empty buffer (front element not available)

View File

@@ -227,7 +227,9 @@ public:
//! Difference type.
typedef typename base_iterator::difference_type difference_type;
public:
#if !defined(BOOST_CB_TEST) && BOOST_CB_ENABLE_DEBUG == 0
private:
#endif
// Member variables
//! The circular buffer where the iterator points to.

View File

@@ -150,8 +150,7 @@ 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(const capacity_type&)</code>
\sa <code>reserve()</code>, <code>size()</code>, <code>max_size()</code>, <code>set_capacity()</code>
*/
const capacity_type& capacity() const { return m_capacity_ctrl; }
@@ -192,8 +191,7 @@ 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(const capacity_type&)</code>,
<code>\link resize() resize(size_type, const_reference)\endlink</code>
\sa <code>rset_capacity()</code>, <code>resize()</code>
*/
void set_capacity(const capacity_type& capacity_ctrl) {
m_capacity_ctrl = capacity_ctrl;
@@ -228,8 +226,7 @@ public:
equal to <code>end()</code>).
\par Complexity
Linear (in the new size of the <code>circular_buffer_space_optimized</code>).
\sa <code>\link rresize() rresize(size_type, const_reference)\endlink</code>,
<code>set_capacity(const capacity_type&)</code>
\sa <code>rresize()</code>, <code>set_capacity()</code>
*/
void resize(size_type new_size, param_value_type item = value_type()) {
if (new_size > size()) {
@@ -263,8 +260,7 @@ public:
equal to <code>end()</code>).
\par Complexity
Linear (in <code>min[size(), capacity_ctrl.%capacity()]</code>).
\sa <code>set_capacity(const capacity_type&)</code>,
<code>\link rresize() rresize(size_type, const_reference)\endlink</code>
\sa <code>set_capacity()</code>, <code>rresize()</code>
*/
void rset_capacity(const capacity_type& capacity_ctrl) {
m_capacity_ctrl = capacity_ctrl;
@@ -299,8 +295,7 @@ public:
equal to <code>end()</code>).
\par Complexity
Linear (in the new size of the <code>circular_buffer_space_optimized</code>).
\sa <code>\link resize() resize(size_type, const_reference)\endlink</code>,
<code>rset_capacity(const capacity_type&)</code>
\sa <code>rresize()</code>, <code>set_capacity()</code>
*/
void rresize(size_type new_size, param_value_type item = value_type()) {
if (new_size > size()) {
@@ -722,8 +717,7 @@ public:
equal to <code>end()</code>).
\par Complexity
Linear (in the size of the <code>circular_buffer_space_optimized</code>).
\sa <code>\link push_front() push_front(const_reference)\endlink</code>, <code>pop_back()</code>,
<code>pop_front()</code>
\sa <code>push_front()</code>, <code>pop_back()</code>, <code>pop_front()</code>
*/
void push_back(param_value_type item = value_type()) {
check_low_capacity();
@@ -747,8 +741,7 @@ public:
equal to <code>end()</code>).
\par Complexity
Linear (in the size of the <code>circular_buffer_space_optimized</code>).
\sa <code>\link push_back() push_back(const_reference)\endlink</code>, <code>pop_back()</code>,
<code>pop_front()</code>
\sa <code>push_back()</code>, <code>pop_back()</code>, <code>pop_front()</code>
*/
void push_front(param_value_type item = value_type()) {
check_low_capacity();
@@ -769,8 +762,7 @@ 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>\link push_back() push_back(const_reference)\endlink</code>,
<code>\link push_front() push_front(const_reference)\endlink</code>
\sa <code>pop_front()</code>, <code>push_back()</code>, <code>push_front()</code>
*/
void pop_back() {
circular_buffer<T, Alloc>::pop_back();
@@ -791,8 +783,7 @@ 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>\link push_back() push_back(const_reference)\endlink</code>,
<code>\link push_front() push_front(const_reference)\endlink</code>
\sa <code>pop_back()</code>, <code>push_back()</code>, <code>push_front()</code>
*/
void pop_front() {
circular_buffer<T, Alloc>::pop_front();