|
Boost-Commit : |
From: jano_gaspar_at_[hidden]
Date: 2008-05-21 11:53:52
Author: jano_gaspar
Date: 2008-05-21 11:53:50 EDT (Wed, 21 May 2008)
New Revision: 45609
URL: http://svn.boost.org/trac/boost/changeset/45609
Log:
circular_buffer: bugfix #1919, #1852
Removed:
trunk/libs/circular_buffer/doc/valid-html40.png
Text files modified:
trunk/boost/circular_buffer/base.hpp | 67 ++++--
trunk/boost/circular_buffer/space_optimized.hpp | 9
trunk/libs/circular_buffer/doc/circular_buffer.html | 392 ++++++++++++++++++++++-----------------
trunk/libs/circular_buffer/doc/space_optimized.html | 245 +++++++++++-------------
trunk/libs/circular_buffer/test/common.ipp | 40 +++
trunk/libs/circular_buffer/test/space_optimized_test.cpp | 19 +
6 files changed, 426 insertions(+), 346 deletions(-)
Modified: trunk/boost/circular_buffer/base.hpp
==============================================================================
--- trunk/boost/circular_buffer/base.hpp (original)
+++ trunk/boost/circular_buffer/base.hpp 2008-05-21 11:53:50 EDT (Wed, 21 May 2008)
@@ -907,22 +907,23 @@
// Construction/Destruction
- //! Create an empty <code>circular_buffer</code> with a maximum capacity.
+ //! Create an empty <code>circular_buffer</code> with zero capacity.
/*!
- \post <code>capacity() == max_size() \&\& size() == 0</code>
+ \post <code>capacity() == 0 \&\& size() == 0</code>
\param alloc The allocator.
\throws "An allocation error" if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
used).
\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()).
+ \warning Since Boost version 1.36 the behaviour of this constructor has changed. Now the constructor does not
+ allocate any memory and both capacity and size are set to zero. Also note when inserting an element
+ into a <code>circular_buffer</code> with zero capacity (e.g. by
+ <code>\link push_back() push_back(const_reference)\endlink</code> or
+ <code>\link insert(iterator, param_value_type) insert(iterator, value_type)\endlink</code>) nothing
+ will be inserted and the size (as well as capacity) remains zero.
*/
explicit circular_buffer(const allocator_type& alloc = allocator_type())
- : m_size(0), m_alloc(alloc) {
- initialize(max_size());
- }
+ : m_buff(0), m_end(0), m_first(0), m_last(0), m_size(0), m_alloc(alloc) {}
//! Create an empty <code>circular_buffer</code> with the specified capacity.
/*!
@@ -936,7 +937,8 @@
*/
explicit circular_buffer(capacity_type capacity, const allocator_type& alloc = allocator_type())
: m_size(0), m_alloc(alloc) {
- initialize(capacity);
+ initialize_buffer(capacity);
+ m_first = m_last = m_buff;
}
/*! \brief Create a full <code>circular_buffer</code> with the specified capacity and filled with <code>n</code>
@@ -954,7 +956,8 @@
*/
circular_buffer(size_type n, param_value_type item, const allocator_type& alloc = allocator_type())
: m_size(n), m_alloc(alloc) {
- initialize(n, item);
+ initialize_buffer(n, item);
+ m_first = m_last = m_buff;
}
/*! \brief Create a <code>circular_buffer</code> with the specified capacity and filled with <code>n</code>
@@ -976,7 +979,9 @@
const allocator_type& alloc = allocator_type())
: m_size(n), m_alloc(alloc) {
BOOST_CB_ASSERT(capacity >= size()); // check for capacity lower than size
- initialize(capacity, item);
+ initialize_buffer(capacity, item);
+ m_first = m_buff;
+ m_last = capacity == n ? m_buff : m_buff + n;
}
//! The copy constructor.
@@ -992,14 +997,17 @@
*/
circular_buffer(const circular_buffer<T, Alloc>& cb)
: m_size(cb.size()), m_alloc(cb.get_allocator()) {
- m_first = m_last = m_buff = allocate(cb.capacity());
+ initialize_buffer(cb.capacity());
+ m_first = m_buff;
BOOST_TRY {
- m_end = cb_details::uninitialized_copy_with_alloc(cb.begin(), cb.end(), m_buff, m_alloc);
+ m_last = cb_details::uninitialized_copy_with_alloc(cb.begin(), cb.end(), m_buff, m_alloc);
} BOOST_CATCH(...) {
deallocate(m_buff, cb.capacity());
BOOST_RETHROW
}
BOOST_CATCH_END
+ if (m_last == m_end)
+ m_last = m_buff;
}
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
@@ -1997,15 +2005,15 @@
#endif
}
- //! Initialize the circular buffer.
- void initialize(capacity_type capacity) {
- m_first = m_last = m_buff = allocate(capacity);
+ //! Initialize the internal buffer.
+ void initialize_buffer(capacity_type capacity) {
+ m_buff = allocate(capacity);
m_end = m_buff + capacity;
}
- //! Initialize the circular buffer.
- void initialize(capacity_type capacity, param_value_type item) {
- initialize(capacity);
+ //! Initialize the internal buffer.
+ void initialize_buffer(capacity_type capacity, param_value_type item) {
+ initialize_buffer(capacity);
BOOST_TRY {
cb_details::uninitialized_fill_n_with_alloc(m_buff, size(), item, m_alloc);
} BOOST_CATCH(...) {
@@ -2019,7 +2027,8 @@
template <class IntegralType>
void initialize(IntegralType n, IntegralType item, const true_type&) {
m_size = static_cast<size_type>(n);
- initialize(size(), item);
+ initialize_buffer(size(), item);
+ m_first = m_last = m_buff;
}
//! Specialized initialize method.
@@ -2056,7 +2065,9 @@
void initialize(capacity_type capacity, IntegralType n, IntegralType item, const true_type&) {
BOOST_CB_ASSERT(capacity >= static_cast<size_type>(n)); // check for capacity lower than n
m_size = static_cast<size_type>(n);
- initialize(capacity, item);
+ initialize_buffer(capacity, item);
+ m_first = m_buff;
+ m_last = capacity == size() ? m_buff : m_buff + size();
}
//! Specialized initialize method.
@@ -2076,7 +2087,8 @@
InputIterator first,
InputIterator last,
const std::input_iterator_tag&) {
- initialize(capacity);
+ initialize_buffer(capacity);
+ m_first = m_last = m_buff;
m_size = 0;
if (capacity == 0)
return;
@@ -2102,28 +2114,29 @@
initialize(capacity, first, last, std::distance(first, last));
}
- //! Helper initialize method.
+ //! Initialize the circular buffer.
template <class ForwardIterator>
void initialize(capacity_type capacity,
ForwardIterator first,
ForwardIterator last,
size_type distance) {
- initialize(capacity);
+ initialize_buffer(capacity);
+ m_first = m_buff;
if (distance > capacity) {
std::advance(first, distance - capacity);
m_size = capacity;
} else {
m_size = distance;
- if (distance != capacity)
- m_last = m_buff + size();
}
BOOST_TRY {
- cb_details::uninitialized_copy_with_alloc(first, last, m_buff, m_alloc);
+ m_last = cb_details::uninitialized_copy_with_alloc(first, last, m_buff, m_alloc);
} BOOST_CATCH(...) {
deallocate(m_buff, capacity);
BOOST_RETHROW
}
BOOST_CATCH_END
+ if (m_last == m_end)
+ m_last = m_buff;
}
//! Reset the circular buffer.
Modified: trunk/boost/circular_buffer/space_optimized.hpp
==============================================================================
--- trunk/boost/circular_buffer/space_optimized.hpp (original)
+++ trunk/boost/circular_buffer/space_optimized.hpp 2008-05-21 11:53:50 EDT (Wed, 21 May 2008)
@@ -312,18 +312,19 @@
}
}
- //! Create an empty space optimized circular buffer with a maximum capacity.
+ //! Create an empty space optimized circular buffer with zero capacity.
/*!
- \post <code>capacity().%capacity() == max_size() \&\& capacity().min_capacity() == 0 \&\& size() == 0</code>
- <br><br>There is no memory allocated in the internal buffer.
+ \post <code>capacity().%capacity() == 0 \&\& capacity().min_capacity() == 0 \&\& size() == 0</code>
\param alloc The allocator.
\throws Nothing.
\par Complexity
Constant.
+ \warning Since Boost version 1.36 the behaviour of this constructor has changed. Now it creates a space
+ optimized circular buffer with zero capacity.
*/
explicit circular_buffer_space_optimized(const allocator_type& alloc = allocator_type())
: circular_buffer<T, Alloc>(0, alloc)
- , m_capacity_ctrl(max_size()) {}
+ , m_capacity_ctrl(0) {}
//! Create an empty space optimized circular buffer with the specified capacity.
/*!
Modified: trunk/libs/circular_buffer/doc/circular_buffer.html
==============================================================================
--- trunk/libs/circular_buffer/doc/circular_buffer.html (original)
+++ trunk/libs/circular_buffer/doc/circular_buffer.html 2008-05-21 11:53:50 EDT (Wed, 21 May 2008)
@@ -47,7 +47,8 @@
<a href="#functions">Standalone Functions</a><br>
<a href="#notes">Notes</a><br>
<a href="#see">See also</a><br>
- Acknowledgements
+ Acknowledgements<br>
+ Release Notes
<table id="table_figure" align="right" border="0">
<tr>
<td>
@@ -200,17 +201,17 @@
<a href="#classboost_1_1circular__buffer_164250ffbbbdbc62b99e8301fc195b80c">~circular_buffer</a>();
allocator_type <a href=
-"#classboost_1_1circular__buffer_15693ba52e58ef90f1d914cbb63143cd3">get_allocator</a>() const;
+"#classboost_1_1circular__buffer_1a20b7d0e7a4da0af13286df9f53d660c">get_allocator</a>() const;
allocator_type& get_allocator();
iterator begin();
iterator end();
- const_iterator begin() const;
- const_iterator end() const;
+ const_iterator begin() const;
+ const_iterator end() const;
reverse_iterator rbegin();
reverse_iterator rend();
const_reverse_iterator <a href=
-"#classboost_1_1circular__buffer_146a8356a1aec6abca9c44cfc60b3bb10">rbegin</a>() const;
- const_reverse_iterator rend() const;
+"#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin</a>() const;
+ const_reverse_iterator rend() const;
reference <a href=
"#classboost_1_1circular__buffer_1d219f0d3203fb43b964a8cf63f1865cd">operator[]</a>(size_type index);
const_reference <a href=
@@ -220,19 +221,19 @@
"#classboost_1_1circular__buffer_1b233a298f5845a0fcf2ecc56f4170810">at</a>(size_type index) const;
reference front();
reference back();
- const_reference front() const;
- const_reference back() const;
+ const_reference front() const;
+ const_reference back() const;
array_range array_one();
array_range array_two();
- const_array_range array_one() const;
- const_array_range array_two() const;
+ const_array_range array_one() const;
+ const_array_range array_two() const;
pointer linearize();
- size_type size() const;
- size_type max_size() const;
- bool empty() const;
- bool full() const;
- size_type reserve() const;
- capacity_type capacity() const;
+ size_type size() const;
+ size_type max_size() const;
+ bool empty() const;
+ bool full() const;
+ size_type reserve() const;
+ capacity_type capacity() const;
void <a href=
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity</a>(capacity_type new_capacity);
void <a href=
@@ -723,6 +724,52 @@
Default
</th>
</tr>
+ <tr>
+ <td>
+ <a id="templateparam_T" name="templateparam_T"><code>T</code></a>
+ </td>
+ <td>
+ The type of the elements stored in the <code>circular_buffer</code>.
+ <dl>
+ <dt>
+ <b>Type Requirements:</b>
+ </dt>
+ <dd>
+ The <code>T</code> has to be SGIAssignable
+ (SGI STL defined combination of Assignable and <a href=
+ "../../utility/CopyConstructible.html">CopyConstructible</a>). Moreover <code>T</code> has to be
+ DefaultConstructible if supplied as
+ a default parameter when invoking some of the <code>circular_buffer</code>'s methods e.g.
+ <code>insert(iterator pos, const value_type& item = value_type())</code>. And <a href=
+ "http://www.sgi.com/tech/stl/EqualityComparable.html">EqualityComparable</a> and/or <a href=
+ "../../utility/LessThanComparable.html">LessThanComparable</a> if the <code>circular_buffer</code> will
+ be compared with another container.
+ </dd>
+ </dl>
+ </td>
+ <td>
+ <br>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a id="templateparam_Alloc" name="templateparam_Alloc"><code>Alloc</code></a>
+ </td>
+ <td>
+ The allocator type used for all internal memory management.
+ <dl>
+ <dt>
+ <b>Type Requirements:</b>
+ </dt>
+ <dd>
+ The <code>Alloc</code> has to meet the allocator requirements imposed by STL.
+ </dd>
+ </dl>
+ </td>
+ <td>
+ <code>std::allocator<T></code>
+ </td>
+ </tr>
</table>
</div>
<h2>
@@ -894,15 +941,15 @@
"#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>& alloc =
allocator_type());</b></code><br>
<br>
- Create an empty <code>circular_buffer</code> with a maximum capacity.
+ Create an empty <code>circular_buffer</code> with zero capacity.
<dl>
<dt>
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() ==
- max_size() &&
- size() == 0</code>
+ <code>capacity() == 0
+ && size() ==
+ 0</code>
</dd>
</dl>
<dl>
@@ -942,9 +989,12 @@
<b>Warning:</b>
</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()).
+ Since Boost version 1.36 the behaviour of this constructor has changed. Now the constructor does not
+ allocate any memory and both capacity and size are set to zero. Also note when inserting an element
+ into a <code>circular_buffer</code> with zero capacity (e.g. by <code><a href=
+ "#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back(const_reference)</a></code>
+ or <code><a href="#classboost_1_1circular__buffer_128c92740fee1b9deb8c69816e389de95">insert(iterator,
+ value_type)</a></code>) nothing will be inserted and the size (as well as capacity) remains zero.
</dd>
</dl>
</td>
@@ -964,9 +1014,9 @@
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() ==
+ <code>capacity() ==
capacity && <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> == 0</code>
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == 0</code>
</dd>
</dl>
<dl>
@@ -1029,8 +1079,8 @@
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() == n
- && full()
+ <code>capacity() == n
+ && full()
&& (*this)[0] == item && (*this)[1] == item && ... && (*this)[n - 1] ==
item</code>
</dd>
@@ -1117,9 +1167,9 @@
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() ==
+ <code>capacity() ==
capacity && <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> == n &&
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == n &&
(*this)[0] == item && (*this)[1] == item && ... && (*this)[n - 1] ==
item</code>
</dd>
@@ -1271,9 +1321,9 @@
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() ==
+ <code>capacity() ==
std::distance(first, last) && <a href=
- "#classboost_1_1circular__buffer_174a305e473c0bba9dcf30abb68bff909">full()</a> && (*this)[0]==
+ "#classboost_1_1circular__buffer_1fd0eef8ba91210d1575404b7e3e8207a">full()</a> && (*this)[0]==
*first && (*this)[1] == *(first + 1) && ... && (*this)[std::distance(first,
last) - 1] == *(last - 1)</code>
</dd>
@@ -1362,9 +1412,9 @@
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() ==
+ <code>capacity() ==
capacity && <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> <=
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> <=
std::distance(first, last) && (*this)[0]== *(last - capacity) && (*this)[1] == *(last -
capacity + 1) && ... && (*this)[capacity - 1] == *(last - 1)</code><br>
<br>
@@ -1496,8 +1546,8 @@
<table id="table_methods" border="1" cellpadding="3">
<tr>
<td>
- <a id="classboost_1_1circular__buffer_15693ba52e58ef90f1d914cbb63143cd3" name=
- "classboost_1_1circular__buffer_15693ba52e58ef90f1d914cbb63143cd3"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_1a20b7d0e7a4da0af13286df9f53d660c" name=
+ "classboost_1_1circular__buffer_1a20b7d0e7a4da0af13286df9f53d660c"></a><code><b><a href=
"#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a> get_allocator()
const;</b></code><br>
<br>
@@ -1616,7 +1666,7 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href="#classboost_1_1circular__buffer_15693ba52e58ef90f1d914cbb63143cd3">get_allocator()
+ <code><a href="#classboost_1_1circular__buffer_1a20b7d0e7a4da0af13286df9f53d660c">get_allocator()
const</a></code>
</dd>
</dl>
@@ -1747,8 +1797,8 @@
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_1ee6c38b2ecdc8dfec79975dbc685c80b" name=
- "classboost_1_1circular__buffer_1ee6c38b2ecdc8dfec79975dbc685c80b"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038" name=
+ "classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038"></a><code><b><a href=
"#classboost_1_1circular__buffer_15cab6d46f03c40d1e52d41843319ddb9">const_iterator</a> begin()
const;</b></code><br>
<br>
@@ -1760,7 +1810,7 @@
<dd>
A const random access iterator pointing to the first element of the <code>circular_buffer</code>. If
the <code>circular_buffer</code> is empty it returns an iterator equal to the one returned by
- <code><a href="#classboost_1_1circular__buffer_19813e1d191cd04c4cfc100bbc4733e92">end()
+ <code><a href="#classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac">end()
const</a></code>.
</dd>
</dl>
@@ -1801,10 +1851,10 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href="#classboost_1_1circular__buffer_19813e1d191cd04c4cfc100bbc4733e92">end()
+ <code><a href="#classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac">end()
const</a></code>, <code><a href=
- "#classboost_1_1circular__buffer_146a8356a1aec6abca9c44cfc60b3bb10">rbegin() const</a></code>,
- <code><a href="#classboost_1_1circular__buffer_1a09f7111dde9f52a4d8babfcdef7e798">rend()
+ "#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin() const</a></code>,
+ <code><a href="#classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3">rend()
const</a></code>
</dd>
</dl>
@@ -1812,8 +1862,8 @@
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_19813e1d191cd04c4cfc100bbc4733e92" name=
- "classboost_1_1circular__buffer_19813e1d191cd04c4cfc100bbc4733e92"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac" name=
+ "classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac"></a><code><b><a href=
"#classboost_1_1circular__buffer_15cab6d46f03c40d1e52d41843319ddb9">const_iterator</a> end()
const;</b></code><br>
<br>
@@ -1826,7 +1876,7 @@
A const random access iterator pointing to the element "one behind" the last element of the
<code>circular_buffer</code>. If the <code>circular_buffer</code> is empty it returns an iterator equal
to the one returned by <code><a href=
- "#classboost_1_1circular__buffer_1ee6c38b2ecdc8dfec79975dbc685c80b">begin() const</a></code> const.
+ "#classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038">begin() const</a></code> const.
</dd>
</dl>
<dl>
@@ -1866,10 +1916,10 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href="#classboost_1_1circular__buffer_1ee6c38b2ecdc8dfec79975dbc685c80b">begin()
+ <code><a href="#classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038">begin()
const</a></code>, <code><a href=
- "#classboost_1_1circular__buffer_146a8356a1aec6abca9c44cfc60b3bb10">rbegin() const</a></code>,
- <code><a href="#classboost_1_1circular__buffer_1a09f7111dde9f52a4d8babfcdef7e798">rend()
+ "#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin() const</a></code>,
+ <code><a href="#classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3">rend()
const</a></code>
</dd>
</dl>
@@ -2002,8 +2052,8 @@
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_146a8356a1aec6abca9c44cfc60b3bb10" name=
- "classboost_1_1circular__buffer_146a8356a1aec6abca9c44cfc60b3bb10"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026" name=
+ "classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026"></a><code><b><a href=
"#classboost_1_1circular__buffer_1c7317701b511bc5f7a663b06b53e2b73">const_reverse_iterator</a> rbegin()
const;</b></code><br>
<br>
@@ -2016,7 +2066,7 @@
A const reverse random access iterator pointing to the last element of the
<code>circular_buffer</code>. If the <code>circular_buffer</code> is empty it returns an iterator equal
to the one returned by <code><a href=
- "#classboost_1_1circular__buffer_1a09f7111dde9f52a4d8babfcdef7e798">rend() const</a></code>.
+ "#classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3">rend() const</a></code>.
</dd>
</dl>
<dl>
@@ -2056,10 +2106,10 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href="#classboost_1_1circular__buffer_1a09f7111dde9f52a4d8babfcdef7e798">rend()
+ <code><a href="#classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3">rend()
const</a></code>, <code><a href=
- "#classboost_1_1circular__buffer_1ee6c38b2ecdc8dfec79975dbc685c80b">begin() const</a></code>,
- <code><a href="#classboost_1_1circular__buffer_19813e1d191cd04c4cfc100bbc4733e92">end()
+ "#classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038">begin() const</a></code>,
+ <code><a href="#classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac">end()
const</a></code>
</dd>
</dl>
@@ -2067,8 +2117,8 @@
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_1a09f7111dde9f52a4d8babfcdef7e798" name=
- "classboost_1_1circular__buffer_1a09f7111dde9f52a4d8babfcdef7e798"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3" name=
+ "classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3"></a><code><b><a href=
"#classboost_1_1circular__buffer_1c7317701b511bc5f7a663b06b53e2b73">const_reverse_iterator</a> rend()
const;</b></code><br>
<br>
@@ -2081,7 +2131,7 @@
A const reverse random access iterator pointing to the element "one before" the first element of the
<code>circular_buffer</code>. If the <code>circular_buffer</code> is empty it returns an iterator equal
to the one returned by <code><a href=
- "#classboost_1_1circular__buffer_146a8356a1aec6abca9c44cfc60b3bb10">rbegin() const</a></code>.
+ "#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin() const</a></code>.
</dd>
</dl>
<dl>
@@ -2121,10 +2171,10 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href="#classboost_1_1circular__buffer_146a8356a1aec6abca9c44cfc60b3bb10">rbegin()
+ <code><a href="#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin()
const</a></code>, <code><a href=
- "#classboost_1_1circular__buffer_1ee6c38b2ecdc8dfec79975dbc685c80b">begin() const</a></code>,
- <code><a href="#classboost_1_1circular__buffer_19813e1d191cd04c4cfc100bbc4733e92">end()
+ "#classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038">begin() const</a></code>,
+ <code><a href="#classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac">end()
const</a></code>
</dd>
</dl>
@@ -2144,7 +2194,7 @@
</dt>
<dd>
<code>0 <= index && index < <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a></code>
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>
</dd>
</dl>
<dl>
@@ -2227,7 +2277,7 @@
</dt>
<dd>
<code>0 <= index && index < <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a></code>
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>
</dd>
</dl>
<dl>
@@ -2332,7 +2382,7 @@
</dt>
<dd>
<code>std::out_of_range</code> when the <code>index</code> is invalid (when <code>index >= <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a></code>).
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>).
</dd>
</dl>
<dl>
@@ -2364,7 +2414,7 @@
<b>See Also:</b>
</dt>
<dd>
- <code>operator[]</code>
+ <code>operator[]</code>
</dd>
</dl>
</td>
@@ -2407,7 +2457,7 @@
</dt>
<dd>
<code>std::out_of_range</code> when the <code>index</code> is invalid (when <code>index >= <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a></code>).
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>).
</dd>
</dl>
<dl>
@@ -2577,8 +2627,8 @@
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_13261c47e81bb5e447fb0d70f096728b8" name=
- "classboost_1_1circular__buffer_13261c47e81bb5e447fb0d70f096728b8"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_10df8595d83bb9d8a7ce50aabc678f90b" name=
+ "classboost_1_1circular__buffer_10df8595d83bb9d8a7ce50aabc678f90b"></a><code><b><a href=
"#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> front()
const;</b></code><br>
<br>
@@ -2636,7 +2686,7 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href="#classboost_1_1circular__buffer_14cd3a019a9d99b4e29918b51c2181a07">back()
+ <code><a href="#classboost_1_1circular__buffer_1027201797868c6274feb6712f670a132">back()
const</a></code>
</dd>
</dl>
@@ -2644,8 +2694,8 @@
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_14cd3a019a9d99b4e29918b51c2181a07" name=
- "classboost_1_1circular__buffer_14cd3a019a9d99b4e29918b51c2181a07"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_1027201797868c6274feb6712f670a132" name=
+ "classboost_1_1circular__buffer_1027201797868c6274feb6712f670a132"></a><code><b><a href=
"#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> back()
const;</b></code><br>
<br>
@@ -2703,7 +2753,7 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href="#classboost_1_1circular__buffer_13261c47e81bb5e447fb0d70f096728b8">front()
+ <code><a href="#classboost_1_1circular__buffer_10df8595d83bb9d8a7ce50aabc678f90b">front()
const</a></code>
</dd>
</dl>
@@ -2910,15 +2960,15 @@
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_1586cfbdef335f1d3d31faacec63f7b04" name=
- "classboost_1_1circular__buffer_1586cfbdef335f1d3d31faacec63f7b04"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_10f4b157e27b1170a571417986b239945" name=
+ "classboost_1_1circular__buffer_10f4b157e27b1170a571417986b239945"></a><code><b><a href=
"#classboost_1_1circular__buffer_11885d7f475b7e7a74c95b2448d243025">const_array_range</a> array_one()
const;</b></code><br>
<br>
Get the first continuous array of the internal buffer.
<p>
This method in combination with <code><a href=
- "#classboost_1_1circular__buffer_191a0e2c33c0e5b4d7b8c497847bc29ce">array_two() const</a></code> can be
+ "#classboost_1_1circular__buffer_1bb8eb0f298ad2012c55c5303e1f174d5">array_two() const</a></code> can be
useful when passing the stored data into a legacy C API as an array.
</p>
<dl>
@@ -2967,7 +3017,7 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href="#classboost_1_1circular__buffer_191a0e2c33c0e5b4d7b8c497847bc29ce">array_two()
+ <code><a href="#classboost_1_1circular__buffer_1bb8eb0f298ad2012c55c5303e1f174d5">array_two()
const</a></code>; <code><a href=
"#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one()</a></code> for more
details how to pass data into a legacy C API.
@@ -2977,15 +3027,15 @@
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_191a0e2c33c0e5b4d7b8c497847bc29ce" name=
- "classboost_1_1circular__buffer_191a0e2c33c0e5b4d7b8c497847bc29ce"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_1bb8eb0f298ad2012c55c5303e1f174d5" name=
+ "classboost_1_1circular__buffer_1bb8eb0f298ad2012c55c5303e1f174d5"></a><code><b><a href=
"#classboost_1_1circular__buffer_11885d7f475b7e7a74c95b2448d243025">const_array_range</a> array_two()
const;</b></code><br>
<br>
Get the second continuous array of the internal buffer.
<p>
This method in combination with <code><a href=
- "#classboost_1_1circular__buffer_1586cfbdef335f1d3d31faacec63f7b04">array_one() const</a></code> can be
+ "#classboost_1_1circular__buffer_10f4b157e27b1170a571417986b239945">array_one() const</a></code> can be
useful when passing the stored data into a legacy C API as an array.
</p>
<dl>
@@ -3035,7 +3085,7 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href="#classboost_1_1circular__buffer_1586cfbdef335f1d3d31faacec63f7b04">array_one()
+ <code><a href="#classboost_1_1circular__buffer_10f4b157e27b1170a571417986b239945">array_one()
const</a></code>
</dd>
</dl>
@@ -3057,7 +3107,7 @@
</dt>
<dd>
<code>&(*this)[0] < &(*this)[1] < ... < &(*this)[<a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> - 1]</code>
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> - 1]</code>
</dd>
</dl>
<dl>
@@ -3132,8 +3182,8 @@
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213" name=
- "classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32" name=
+ "classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32"></a><code><b><a href=
"#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> size()
const;</b></code><br>
<br>
@@ -3184,10 +3234,10 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer_1da435a5884cad746ed5cd55bcb892035">capacity()</a></code>,
+ "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a></code>,
<code><a href=
- "#classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995">max_size()</a></code>,
- <code>reserve()</code>,
+ "#classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7">max_size()</a></code>,
+ <code>reserve()</code>,
<code><a href="#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize(size_type,
const_reference)</a></code>
</dd>
@@ -3196,8 +3246,8 @@
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995" name=
- "classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7" name=
+ "classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7"></a><code><b><a href=
"#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> max_size()
const;</b></code><br>
<br>
@@ -3248,18 +3298,18 @@
<b>See Also:</b>
</dt>
<dd>
- <code>size()</code>,
+ <code>size()</code>,
<code><a href=
- "#classboost_1_1circular__buffer_1da435a5884cad746ed5cd55bcb892035">capacity()</a></code>,
- <code>reserve()</code>
+ "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a></code>,
+ <code>reserve()</code>
</dd>
</dl>
</td>
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_105acab2b9a0b41044b5241cfc9d87663" name=
- "classboost_1_1circular__buffer_105acab2b9a0b41044b5241cfc9d87663"></a><code><b>bool empty()
+ <a id="classboost_1_1circular__buffer_15be1c2a005ec9828549ef6dd7ebed583" name=
+ "classboost_1_1circular__buffer_15be1c2a005ec9828549ef6dd7ebed583"></a><code><b>bool empty()
const;</b></code><br>
<br>
Is the <code>circular_buffer</code> empty?
@@ -3309,15 +3359,15 @@
<b>See Also:</b>
</dt>
<dd>
- <code>full()</code>
+ <code>full()</code>
</dd>
</dl>
</td>
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_174a305e473c0bba9dcf30abb68bff909" name=
- "classboost_1_1circular__buffer_174a305e473c0bba9dcf30abb68bff909"></a><code><b>bool full()
+ <a id="classboost_1_1circular__buffer_1fd0eef8ba91210d1575404b7e3e8207a" name=
+ "classboost_1_1circular__buffer_1fd0eef8ba91210d1575404b7e3e8207a"></a><code><b>bool full()
const;</b></code><br>
<br>
Is the <code>circular_buffer</code> full?
@@ -3367,15 +3417,15 @@
<b>See Also:</b>
</dt>
<dd>
- <code>empty()</code>
+ <code>empty()</code>
</dd>
</dl>
</td>
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_17e144e8c7acd8e30c08bfb03391a2338" name=
- "classboost_1_1circular__buffer_17e144e8c7acd8e30c08bfb03391a2338"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de" name=
+ "classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de"></a><code><b><a href=
"#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> reserve()
const;</b></code><br>
<br>
@@ -3386,8 +3436,8 @@
<b>Returns:</b>
</dt>
<dd>
- <code>capacity() -
- size()</code>
+ <code>capacity() -
+ size()</code>
</dd>
</dl>
<dl>
@@ -3428,17 +3478,17 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer_1da435a5884cad746ed5cd55bcb892035">capacity()</a></code>,
- <code>size()</code>,
- <code>max_size()</code>
+ "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a></code>,
+ <code>size()</code>,
+ <code>max_size()</code>
</dd>
</dl>
</td>
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer_1da435a5884cad746ed5cd55bcb892035" name=
- "classboost_1_1circular__buffer_1da435a5884cad746ed5cd55bcb892035"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77" name=
+ "classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77"></a><code><b><a href=
"#classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595">capacity_type</a> capacity()
const;</b></code><br>
<br>
@@ -3488,10 +3538,10 @@
<b>See Also:</b>
</dt>
<dd>
- <code>reserve()</code>,
- <code>size()</code>,
+ <code>reserve()</code>,
+ <code>size()</code>,
<code><a href=
- "#classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995">max_size()</a></code>,
+ "#classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7">max_size()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity(capacity_type)</a></code>
</dd>
@@ -3511,14 +3561,14 @@
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() ==
+ <code>capacity() ==
new_capacity && <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> <=
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> <=
new_capacity</code><br>
<br>
If the current number of elements stored in the <code>circular_buffer</code> is greater than the
desired new capacity then number of <code>[<a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> - new_capacity]</code>
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> - new_capacity]</code>
<b>last</b> elements will be removed and the new size will be equal to <code>new_capacity</code>.
</dd>
</dl>
@@ -3573,7 +3623,7 @@
</dt>
<dd>
Linear (in <code>min[<a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a>, new_capacity]</code>).
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a>, new_capacity]</code>).
</dd>
</dl>
<dl>
@@ -3603,9 +3653,9 @@
<b>Effect:</b>
</dt>
<dd>
- <code>size() ==
+ <code>size() ==
new_size && <a href=
- "#classboost_1_1circular__buffer_1da435a5884cad746ed5cd55bcb892035">capacity()</a> >=
+ "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> >=
new_size</code><br>
<br>
If the new size is greater than the current size, copies of <code>item</code> will be inserted at the
@@ -3614,7 +3664,7 @@
<code>new_size</code>.<br>
If the current number of elements stored in the <code>circular_buffer</code> is greater than the
desired new size then number of <code>[<a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> - new_size]</code>
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> - new_size]</code>
<b>last</b> elements will be removed. (The capacity will remain unchanged.)
</dd>
</dl>
@@ -3709,14 +3759,14 @@
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() ==
+ <code>capacity() ==
new_capacity && <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> <=
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> <=
new_capacity</code><br>
<br>
If the current number of elements stored in the <code>circular_buffer</code> is greater than the
desired new capacity then number of <code>[<a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> - new_capacity]</code>
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> - new_capacity]</code>
<b>first</b> elements will be removed and the new size will be equal to <code>new_capacity</code>.
</dd>
</dl>
@@ -3771,7 +3821,7 @@
</dt>
<dd>
Linear (in <code>min[<a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a>, new_capacity]</code>).
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a>, new_capacity]</code>).
</dd>
</dl>
<dl>
@@ -3801,9 +3851,9 @@
<b>Effect:</b>
</dt>
<dd>
- <code>size() ==
+ <code>size() ==
new_size && <a href=
- "#classboost_1_1circular__buffer_1da435a5884cad746ed5cd55bcb892035">capacity()</a> >=
+ "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> >=
new_size</code><br>
<br>
If the new size is greater than the current size, copies of <code>item</code> will be inserted at the
@@ -3812,7 +3862,7 @@
<code>new_size</code>.<br>
If the current number of elements stored in the <code>circular_buffer</code> is greater than the
desired new size then number of <code>[<a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> - new_size]</code>
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> - new_size]</code>
<b>first</b> elements will be removed. (The capacity will remain unchanged.)
</dd>
</dl>
@@ -3999,8 +4049,8 @@
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() == n
- && size() == n
+ <code>capacity() == n
+ && size() == n
&& (*this)[0] == item && (*this)[1] == item && ... && (*this) [n - 1]
== item</code>
</dd>
@@ -4072,9 +4122,9 @@
<b>See Also:</b>
</dt>
<dd>
- <code>operator=</code>,
- <code><a href="#classboost_1_1circular__buffer_1aa10b4e4ec1f1c5918931b04b31d43ca">assign(capacity_type,
- size_type, const_reference)</a></code>, <code><a href=
+ <code>operator=</code>, <code><a href=
+ "#classboost_1_1circular__buffer_1aa10b4e4ec1f1c5918931b04b31d43ca">assign(capacity_type, size_type,
+ const_reference)</a></code>, <code><a href=
"#classboost_1_1circular__buffer_1253302d9bda5d7efbc4a6c311de3790c">assign(InputIterator,
InputIterator)</a></code>, <code><a href=
"#classboost_1_1circular__buffer_11edb80acdf1f7f1df8217d57256e41f6">assign(capacity_type,
@@ -4111,9 +4161,9 @@
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() ==
+ <code>capacity() ==
capacity && <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> == n &&
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == n &&
(*this)[0] == item && (*this)[1] == item && ... && (*this) [n - 1] ==
item</code>
</dd>
@@ -4195,8 +4245,8 @@
<b>See Also:</b>
</dt>
<dd>
- <code>operator=</code>,
- <code><a href="#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign(size_type,
+ <code>operator=</code>, <code><a href=
+ "#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign(size_type,
const_reference)</a></code>, <code><a href=
"#classboost_1_1circular__buffer_1253302d9bda5d7efbc4a6c311de3790c">assign(InputIterator,
InputIterator)</a></code>, <code><a href=
@@ -4233,9 +4283,9 @@
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() ==
+ <code>capacity() ==
std::distance(first, last) && <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> == std::distance(first,
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == std::distance(first,
last) && (*this)[0]== *first && (*this)[1] == *(first + 1) && ... &&
(*this)[std::distance(first, last) - 1] == *(last - 1)</code>
</dd>
@@ -4307,8 +4357,8 @@
<b>See Also:</b>
</dt>
<dd>
- <code>operator=</code>,
- <code><a href="#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign(size_type,
+ <code>operator=</code>, <code><a href=
+ "#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign(size_type,
const_reference)</a></code>, <code><a href=
"#classboost_1_1circular__buffer_1aa10b4e4ec1f1c5918931b04b31d43ca">assign(capacity_type, size_type,
const_reference)</a></code>, <code><a href=
@@ -4348,9 +4398,9 @@
<b>Effect:</b>
</dt>
<dd>
- <code>capacity() ==
+ <code>capacity() ==
capacity && <a href=
- "#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> <=
+ "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> <=
std::distance(first, last) && (*this)[0]== *(last - capacity) && (*this)[1] == *(last -
capacity + 1) && ... && (*this)[capacity - 1] == *(last - 1)</code><br>
<br>
@@ -4438,8 +4488,8 @@
<b>See Also:</b>
</dt>
<dd>
- <code>operator=</code>,
- <code><a href="#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign(size_type,
+ <code>operator=</code>, <code><a href=
+ "#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign(size_type,
const_reference)</a></code>, <code><a href=
"#classboost_1_1circular__buffer_1aa10b4e4ec1f1c5918931b04b31d43ca">assign(capacity_type, size_type,
const_reference)</a></code>, <code><a href=
@@ -4539,7 +4589,7 @@
<b>Effect:</b>
</dt>
<dd>
- if <code>capacity()
+ if <code>capacity()
> 0</code> then <code><a href=
"#classboost_1_1circular__buffer_1d985d974020f88bb4255d8edbae0a30a">back()</a> == item</code><br>
If the <code>circular_buffer</code> is full, the first element will be removed. If the capacity is
@@ -4621,7 +4671,7 @@
<b>Effect:</b>
</dt>
<dd>
- if <code>capacity()
+ if <code>capacity()
> 0</code> then <code><a href=
"#classboost_1_1circular__buffer_10d5fdeabeb352f47d1f7bb1ea8d9819f">front()</a> == item</code><br>
If the <code>circular_buffer</code> is full, the last element will be removed. If the capacity is
@@ -4978,11 +5028,11 @@
<dd>
The number of <code>min[n, (pos - <a href=
"#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>) + <a href=
- "#classboost_1_1circular__buffer_17e144e8c7acd8e30c08bfb03391a2338">reserve()</a>]</code> elements will
+ "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>]</code> elements will
be inserted at the position <code>pos</code>.<br>
The number of <code>min[pos - <a href=
"#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, max[0, n - <a href=
- "#classboost_1_1circular__buffer_17e144e8c7acd8e30c08bfb03391a2338">reserve()</a>]]</code> elements
+ "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>]]</code> elements
will be overwritten at the beginning of the <code>circular_buffer</code>.<br>
(See <i>Example</i> for the explanation.)
</dd>
@@ -5058,7 +5108,7 @@
</dt>
<dd>
Linear (in <code>min[<a href=
- "#classboost_1_1circular__buffer_1da435a5884cad746ed5cd55bcb892035">capacity()</a>, std::distance(pos,
+ "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a>, std::distance(pos,
<a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>) + n]</code>).
</dd>
</dl>
@@ -5132,12 +5182,12 @@
<dd>
Elements from the range <code>[first + max[0, distance(first, last) - (pos - <a href=
"#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>) - <a href=
- "#classboost_1_1circular__buffer_17e144e8c7acd8e30c08bfb03391a2338">reserve()</a>], last)</code> will
+ "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>], last)</code> will
be inserted at the position <code>pos</code>.<br>
The number of <code>min[pos - <a href=
"#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, max[0, distance(first,
last) - <a href=
- "#classboost_1_1circular__buffer_17e144e8c7acd8e30c08bfb03391a2338">reserve()</a>]]</code> elements
+ "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>]]</code> elements
will be overwritten at the beginning of the <code>circular_buffer</code>.<br>
(See <i>Example</i> for the explanation.)
</dd>
@@ -5215,7 +5265,7 @@
Linear (in <code>[std::distance(pos, <a href=
"#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>) + std::distance(first,
last)]</code>; in <code>min[<a href=
- "#classboost_1_1circular__buffer_1da435a5884cad746ed5cd55bcb892035">capacity()</a>, std::distance(pos,
+ "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a>, std::distance(pos,
<a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>) +
std::distance(first, last)]</code> if the <code>InputIterator</code> is a <a href=
"http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>).
@@ -5413,11 +5463,11 @@
<dd>
The number of <code>min[n, (<a href=
"#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> - pos) + <a href=
- "#classboost_1_1circular__buffer_17e144e8c7acd8e30c08bfb03391a2338">reserve()</a>]</code> elements will
+ "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>]</code> elements will
be inserted before the position <code>pos</code>.<br>
The number of <code>min[<a href=
"#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> - pos, max[0, n -
- reserve()]]</code>
+ reserve()]]</code>
elements will be overwritten at the end of the <code>circular_buffer</code>.<br>
(See <i>Example</i> for the explanation.)
</dd>
@@ -5491,7 +5541,7 @@
</dt>
<dd>
Linear (in <code>min[<a href=
- "#classboost_1_1circular__buffer_1da435a5884cad746ed5cd55bcb892035">capacity()</a>,
+ "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a>,
std::distance(begin(),
pos) + n]</code>).
</dd>
@@ -5566,12 +5616,12 @@
<dd>
Elements from the range <code>[first, last - max[0, distance(first, last) - (<a href=
"#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> - pos) - <a href=
- "#classboost_1_1circular__buffer_17e144e8c7acd8e30c08bfb03391a2338">reserve()</a>])</code> will be
+ "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>])</code> will be
inserted before the position <code>pos</code>.<br>
The number of <code>min[<a href=
"#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> - pos, max[0,
distance(first, last) - <a href=
- "#classboost_1_1circular__buffer_17e144e8c7acd8e30c08bfb03391a2338">reserve()</a>]]</code> elements
+ "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>]]</code> elements
will be overwritten at the end of the <code>circular_buffer</code>.<br>
(See <i>Example</i> for the explanation.)
</dd>
@@ -5647,7 +5697,7 @@
Linear (in <code>[std::distance(<a href=
"#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, pos) +
std::distance(first, last)]</code>; in <code>min[<a href=
- "#classboost_1_1circular__buffer_1da435a5884cad746ed5cd55bcb892035">capacity()</a>,
+ "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a>,
std::distance(begin(),
pos) + std::distance(first, last)]</code> if the <code>InputIterator</code> is a <a href=
"http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>).
@@ -6161,7 +6211,7 @@
<b>Effect:</b>
</dt>
<dd>
- <code>size() ==
+ <code>size() ==
0</code>
</dd>
</dl>
@@ -6261,8 +6311,8 @@
<b>Returns:</b>
</dt>
<dd>
- <code>lhs.size() ==
- rhs.size() &&
+ <code>lhs.size() ==
+ rhs.size() &&
<a href="http://www.sgi.com/tech/stl/equal.html">std::equal</a>(lhs.<a href=
"#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, lhs.<a href=
"#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>, rhs.<a href=
@@ -6803,25 +6853,17 @@
version and came with many good ideas and improvements. Also, I would like to thank Howard Hinnant, Nigel Stewart
and everyone who participated at the formal review for valuable comments and ideas.
</p>
+ <h2>
+ <a name="relnotes" id="relnotes">Release Notes</a>
+ </h2>
<hr size="1">
- <table id="footer" width="100%" border="0">
- <tr valign="top">
- <td valign="top" align="left">
- <p>
- <small>Copyright © 2003-2007 Jan Gaspar</small>
- </p>
- <p>
- <small>Use, modification, and distribution is subject to the Boost Software License, Version 1.0.<br>
- (See accompanying file <code>LICENSE_1_0.txt</code> or copy at <a href=
- "http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt>)</small>
- </p>
- </td>
- <td valign="top" align="right">
- <a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
- "http://www.w3.org/Icons/valid-html401" alt="This is a Valid HTML 4.01 Transitional Document." height="31"
- width="88"></a>
- </td>
- </tr>
- </table>
+ <p>
+ <small>Copyright © 2003-2007 Jan Gaspar</small>
+ </p>
+ <p>
+ <small>Use, modification, and distribution is subject to the Boost Software License, Version 1.0.<br>
+ (See accompanying file <code>LICENSE_1_0.txt</code> or copy at <a href=
+ "http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt>)</small>
+ </p>
</body>
</html>
Modified: trunk/libs/circular_buffer/doc/space_optimized.html
==============================================================================
--- trunk/libs/circular_buffer/doc/space_optimized.html (original)
+++ trunk/libs/circular_buffer/doc/space_optimized.html 2008-05-21 11:53:50 EDT (Wed, 21 May 2008)
@@ -35,7 +35,8 @@
<a href="#constructors">Constructors and Destructor</a><br>
<a href="#methods">Specific Public Member Functions</a><br>
<a href="#see">See also</a><br>
- Acknowledgements
+ Acknowledgements<br>
+ Release Notes
<h2>
<a name="description" id="description">Description</a>
</h2>
@@ -136,24 +137,24 @@
"#classboost_1_1circular__buffer__space__optimized_16839c3ea656ff0f800e38096748fe8ac">~circular_buffer_space_optimized</a>();
allocator_type <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_15693ba52e58ef90f1d914cbb63143cd3">get_allocator</a>() const;
+"circular_buffer.html#classboost_1_1circular__buffer_1a20b7d0e7a4da0af13286df9f53d660c">get_allocator</a>() const;
allocator_type& <a href=
"circular_buffer.html#classboost_1_1circular__buffer_1af7758a36ac2f84a3024b50b4fc7e098">get_allocator</a>();
iterator <a href=
"circular_buffer.html#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin</a>();
iterator end();
const_iterator <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_1ee6c38b2ecdc8dfec79975dbc685c80b">begin</a>() const;
+"circular_buffer.html#classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038">begin</a>() const;
const_iterator <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_19813e1d191cd04c4cfc100bbc4733e92">end</a>() const;
+"circular_buffer.html#classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac">end</a>() const;
reverse_iterator <a href=
"circular_buffer.html#classboost_1_1circular__buffer_1db3d6b10b6763549f54d2627228fa7aa">rbegin</a>();
reverse_iterator <a href=
"circular_buffer.html#classboost_1_1circular__buffer_1cff9236a50107188b8942847a4dc2697">rend</a>();
const_reverse_iterator <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_146a8356a1aec6abca9c44cfc60b3bb10">rbegin</a>() const;
+"circular_buffer.html#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin</a>() const;
const_reverse_iterator <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_1a09f7111dde9f52a4d8babfcdef7e798">rend</a>() const;
+"circular_buffer.html#classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3">rend</a>() const;
reference <a href=
"circular_buffer.html#classboost_1_1circular__buffer_1d219f0d3203fb43b964a8cf63f1865cd">operator[]</a>(size_type index);
const_reference <a href=
@@ -167,30 +168,30 @@
reference <a href=
"circular_buffer.html#classboost_1_1circular__buffer_1d985d974020f88bb4255d8edbae0a30a">back</a>();
const_reference <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_13261c47e81bb5e447fb0d70f096728b8">front</a>() const;
+"circular_buffer.html#classboost_1_1circular__buffer_10df8595d83bb9d8a7ce50aabc678f90b">front</a>() const;
const_reference <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_14cd3a019a9d99b4e29918b51c2181a07">back</a>() const;
+"circular_buffer.html#classboost_1_1circular__buffer_1027201797868c6274feb6712f670a132">back</a>() const;
array_range <a href=
"circular_buffer.html#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one</a>();
array_range <a href=
"circular_buffer.html#classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b">array_two</a>();
const_array_range <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_1586cfbdef335f1d3d31faacec63f7b04">array_one</a>() const;
+"circular_buffer.html#classboost_1_1circular__buffer_10f4b157e27b1170a571417986b239945">array_one</a>() const;
const_array_range <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_191a0e2c33c0e5b4d7b8c497847bc29ce">array_two</a>() const;
+"circular_buffer.html#classboost_1_1circular__buffer_1bb8eb0f298ad2012c55c5303e1f174d5">array_two</a>() const;
pointer <a href=
"circular_buffer.html#classboost_1_1circular__buffer_1ea728bf57f91aa8946eddf76ce816a4e">linearize</a>();
size_type <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size</a>() const;
+"circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size</a>() const;
size_type <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995">max_size</a>() const;
+"circular_buffer.html#classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7">max_size</a>() const;
bool <a href=
-"circular_buffer.html#classboost_1_1circular__buffer_105acab2b9a0b41044b5241cfc9d87663">empty</a>() const;
- bool full() const;
+"circular_buffer.html#classboost_1_1circular__buffer_15be1c2a005ec9828549ef6dd7ebed583">empty</a>() const;
+ bool full() const;
size_type <a href=
-"#classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4">reserve</a>() const;
+"#classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f">reserve</a>() const;
const capacity_type& <a href=
-"#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity</a>() const;
+"#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity</a>() const;
void <a href=
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity</a>(const capacity_type& capacity_ctrl);
void <a href=
@@ -342,7 +343,7 @@
<code>capacity >= min_capacity</code>
</dd>
</dl>The <code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a></code>
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a></code>
represents the capacity of the <code>circular_buffer_space_optimized</code> and the
<code>min_capacity()</code> determines the minimal allocated size of its internal buffer. The converting
constructor of the <code>capacity_control</code> allows implicit conversion from
@@ -368,23 +369,19 @@
"circular_buffer.html#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&
alloc = allocator_type());</b></code><br>
<br>
- Create an empty space optimized circular buffer with a maximum capacity.
+ Create an empty space optimized circular buffer with zero capacity.
<dl>
<dt>
<b>Effect:</b>
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity()
- == <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995">max_size()</a>
- && <a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.min_capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity()
== 0 && <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> ==
- 0</code><br>
- <br>
- There is no memory allocated in the internal buffer.
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.min_capacity()
+ == 0 && <a href=
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> ==
+ 0</code>
</dd>
</dl>
<dl>
@@ -418,6 +415,15 @@
Constant.
</dd>
</dl>
+ <dl>
+ <dt>
+ <b>Warning:</b>
+ </dt>
+ <dd>
+ Since Boost version 1.36 the behaviour of this constructor has changed. Now it creates a space
+ optimized circular buffer with zero capacity.
+ </dd>
+ </dl>
</td>
</tr>
<tr>
@@ -437,9 +443,9 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a> ==
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a> ==
capacity_ctrl && <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> ==
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> ==
0</code><br>
<br>
The amount of allocated memory in the internal buffer is <code>capacity_ctrl.min_capacity()</code>.
@@ -508,9 +514,9 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a> ==
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a> ==
capacity_ctrl && <a href=
- "#classboost_1_1circular__buffer__space__optimized_15f5e6fb070d2484eaa037cdf4ffd69a8">full()</a>
+ "#classboost_1_1circular__buffer__space__optimized_142f4a13c50904a4ac0bf746c88451954">full()</a>
&& (*this)[0] == item && (*this)[1] == item && ... && (*this)
[capacity_ctrl.capacity() - 1] == item</code><br>
<br>
@@ -603,9 +609,9 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a> ==
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a> ==
capacity_ctrl && <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> == n
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == n
&& (*this)[0] == item && (*this)[1] == item && ... && (*this)[n - 1] ==
item</code><br>
<br>
@@ -765,11 +771,11 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity()
== std::distance(first, last) && <a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.min_capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.min_capacity()
== 0 && <a href=
- "#classboost_1_1circular__buffer__space__optimized_15f5e6fb070d2484eaa037cdf4ffd69a8">full()</a>
+ "#classboost_1_1circular__buffer__space__optimized_142f4a13c50904a4ac0bf746c88451954">full()</a>
&& (*this)[0]== *first && (*this)[1] == *(first + 1) && ... &&
(*this)[std::distance(first, last) - 1] == *(last - 1)</code><br>
<br>
@@ -862,9 +868,9 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a> ==
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a> ==
capacity_ctrl && <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a>
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a>
<= std::distance(first, last) && (*this)[0]== (last - capacity_ctrl.capacity()) &&
(*this)[1] == *(last - capacity_ctrl.capacity() + 1) && ... &&
(*this)[capacity_ctrl.capacity() - 1] == *(last - 1)</code><br>
@@ -1008,8 +1014,8 @@
<table id="table_methods" border="1" cellpadding="3">
<tr>
<td>
- <a id="classboost_1_1circular__buffer__space__optimized_15f5e6fb070d2484eaa037cdf4ffd69a8" name=
- "classboost_1_1circular__buffer__space__optimized_15f5e6fb070d2484eaa037cdf4ffd69a8"></a><code><b>bool
+ <a id="classboost_1_1circular__buffer__space__optimized_142f4a13c50904a4ac0bf746c88451954" name=
+ "classboost_1_1circular__buffer__space__optimized_142f4a13c50904a4ac0bf746c88451954"></a><code><b>bool
full() const;</b></code><br>
<br>
Is the <code>circular_buffer_space_optimized</code> full?
@@ -1060,15 +1066,15 @@
</dt>
<dd>
<code><a href=
- "circular_buffer.html#classboost_1_1circular__buffer_105acab2b9a0b41044b5241cfc9d87663">empty()</a></code>
+ "circular_buffer.html#classboost_1_1circular__buffer_15be1c2a005ec9828549ef6dd7ebed583">empty()</a></code>
</dd>
</dl>
</td>
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4" name=
- "classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4"></a><code><b><a href=
+ <a id="classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f" name=
+ "classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f"></a><code><b><a href=
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a>
reserve() const;</b></code><br>
<br>
@@ -1080,9 +1086,9 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity()
- <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a></code>
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>
</dd>
</dl>
<dl>
@@ -1123,19 +1129,19 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a></code>,
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a></code>,
<code><a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a></code>,
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>,
<code><a href=
- "circular_buffer.html#classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995">max_size()</a></code>
+ "circular_buffer.html#classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7">max_size()</a></code>
</dd>
</dl>
</td>
</tr>
<tr>
<td>
- <a id="classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353" name=
- "classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353"></a><code><b>const
+ <a id="classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa" name=
+ "classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa"></a><code><b>const
<a href=
"#classboost_1_1circular__buffer__space__optimized_1051350e031c50c8b4a7ca1e1902e92f0">capacity_type</a>&
capacity() const;</b></code><br>
@@ -1188,11 +1194,11 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4">reserve()</a></code>,
+ "#classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f">reserve()</a></code>,
<code><a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a></code>,
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>,
<code><a href=
- "circular_buffer.html#classboost_1_1circular__buffer_195158ed4d4b03794068e259f85291995">max_size()</a></code>,
+ "circular_buffer.html#classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7">max_size()</a></code>,
<code><a href=
"#classboost_1_1circular__buffer__space__optimized_149f28bc5b33d2062b9f6a33b48264e3f">set_capacity(const
capacity_type&)</a></code>
@@ -1216,14 +1222,14 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a> ==
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a> ==
capacity_ctrl && <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a>
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a>
<= capacity_ctrl.capacity()</code><br>
<br>
If the current number of elements stored in the <code>circular_buffer_space_optimized</code> is greater
than the desired new capacity then number of <code>[<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> -
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> -
capacity_ctrl.capacity()]</code> <b>last</b> elements will be removed and the new size will be equal to
<code>capacity_ctrl.capacity()</code>.<br>
<br>
@@ -1283,7 +1289,7 @@
</dt>
<dd>
Linear (in <code>min[<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a>,
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a>,
capacity_ctrl.capacity()]</code>).
</dd>
</dl>
@@ -1337,9 +1343,9 @@
</dt>
<dd>
<code><a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> ==
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> ==
new_size && <a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity()
>= new_size</code><br>
<br>
If the new size is greater than the current size, copies of <code>item</code> will be inserted at the
@@ -1349,7 +1355,7 @@
<br>
If the current number of elements stored in the <code>circular_buffer_space_optimized</code> is greater
than the desired new size then number of <code>[<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> -
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> -
new_size]</code> <b>last</b> elements will be removed. (The capacity will remain unchanged.)<br>
<br>
The amount of allocated memory in the internal buffer may be accommodated as necessary.
@@ -1449,14 +1455,14 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a> ==
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a> ==
capacity_ctrl && <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a>
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a>
<= capacity_ctrl</code><br>
<br>
If the current number of elements stored in the <code>circular_buffer_space_optimized</code> is greater
than the desired new capacity then number of <code>[<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> -
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> -
capacity_ctrl.capacity()]</code> <b>first</b> elements will be removed and the new size will be equal
to <code>capacity_ctrl.capacity()</code>.<br>
<br>
@@ -1516,7 +1522,7 @@
</dt>
<dd>
Linear (in <code>min[<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a>,
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a>,
capacity_ctrl.capacity()]</code>).
</dd>
</dl>
@@ -1551,9 +1557,9 @@
</dt>
<dd>
<code><a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> ==
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> ==
new_size && <a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity()
>= new_size</code><br>
<br>
If the new size is greater than the current size, copies of <code>item</code> will be inserted at the
@@ -1563,7 +1569,7 @@
<br>
If the current number of elements stored in the <code>circular_buffer_space_optimized</code> is greater
than the desired new size then number of <code>[<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> -
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> -
new_size]</code> <b>first</b> elements will be removed. (The capacity will remain unchanged.)<br>
<br>
The amount of allocated memory in the internal buffer may be accommodated as necessary.
@@ -1760,11 +1766,11 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity()
== n && <a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.min_capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.min_capacity()
== 0 && <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> == n
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == n
&& (*this)[0] == item && (*this)[1] == item && ... && (*this) [n - 1]
== item</code><br>
<br>
@@ -1839,9 +1845,7 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href=
- "#classboost_1_1circular__buffer__space__optimized_177e35432c5e69b7a16ef7d937950e7a8">operator=</a></code>,
- <code><a href=
+ <code>operator=</code>, <code><a href=
"#classboost_1_1circular__buffer__space__optimized_1108055ae3f6b1635e1428b0455902cbf">assign(capacity_type,
size_type, const_reference)</a></code>, <code><a href=
"#classboost_1_1circular__buffer__space__optimized_1417de2c2419c44d83a92c463762df5fb">assign(InputIterator,
@@ -1884,9 +1888,9 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a> ==
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a> ==
capacity_ctrl && <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> == n
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == n
&& (*this)[0] == item && (*this)[1] == item && ... && (*this) [n - 1]
== item</code><br>
<br>
@@ -1971,9 +1975,7 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href=
- "#classboost_1_1circular__buffer__space__optimized_177e35432c5e69b7a16ef7d937950e7a8">operator=</a></code>,
- <code><a href=
+ <code>operator=</code>, <code><a href=
"#classboost_1_1circular__buffer__space__optimized_17ca4fda9526d0dad99706763c3b2d9f1">assign(size_type,
const_reference)</a></code>, <code><a href=
"#classboost_1_1circular__buffer__space__optimized_1417de2c2419c44d83a92c463762df5fb">assign(InputIterator,
@@ -2012,11 +2014,11 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity()
== std::distance(first, last) && <a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.min_capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.min_capacity()
== 0 && <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> ==
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> ==
std::distance(first, last) && (*this)[0]== *first && (*this)[1] == *(first + 1)
&& ... && (*this)[std::distance(first, last) - 1] == *(last - 1)</code><br>
<br>
@@ -2091,9 +2093,7 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href=
- "#classboost_1_1circular__buffer__space__optimized_177e35432c5e69b7a16ef7d937950e7a8">operator=</a></code>,
- <code><a href=
+ <code>operator=</code>, <code><a href=
"#classboost_1_1circular__buffer__space__optimized_17ca4fda9526d0dad99706763c3b2d9f1">assign(size_type,
const_reference)</a></code>, <code><a href=
"#classboost_1_1circular__buffer__space__optimized_1108055ae3f6b1635e1428b0455902cbf">assign(capacity_type,
@@ -2135,9 +2135,9 @@
</dt>
<dd>
<code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a> ==
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a> ==
capacity_ctrl && <a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a>
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a>
<= std::distance(first, last) && (*this)[0]== *(last - capacity) && (*this)[1] ==
*(last - capacity + 1) && ... && (*this)[capacity - 1] == *(last - 1)</code><br>
<br>
@@ -2229,9 +2229,7 @@
<b>See Also:</b>
</dt>
<dd>
- <code><a href=
- "#classboost_1_1circular__buffer__space__optimized_177e35432c5e69b7a16ef7d937950e7a8">operator=</a></code>,
- <code><a href=
+ <code>operator=</code>, <code><a href=
"#classboost_1_1circular__buffer__space__optimized_17ca4fda9526d0dad99706763c3b2d9f1">assign(size_type,
const_reference)</a></code>, <code><a href=
"#classboost_1_1circular__buffer__space__optimized_1108055ae3f6b1635e1428b0455902cbf">assign(capacity_type,
@@ -2336,7 +2334,7 @@
</dt>
<dd>
if <code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity()
> 0</code> then <code><a href=
"circular_buffer.html#classboost_1_1circular__buffer_1d985d974020f88bb4255d8edbae0a30a">back()</a> ==
item</code><br>
@@ -2429,7 +2427,7 @@
</dt>
<dd>
if <code><a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity()
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity()
> 0</code> then <code><a href=
"circular_buffer.html#classboost_1_1circular__buffer_10d5fdeabeb352f47d1f7bb1ea8d9819f">front()</a> ==
item</code><br>
@@ -2820,12 +2818,12 @@
The number of <code>min[n, (pos - <a href=
"circular_buffer.html#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>) +
<a href=
- "#classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4">reserve()</a>]</code>
+ "#classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f">reserve()</a>]</code>
elements will be inserted at the position <code>pos</code>.<br>
The number of <code>min[pos - <a href=
"circular_buffer.html#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>,
max[0, n - <a href=
- "#classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4">reserve()</a>]]</code>
+ "#classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f">reserve()</a>]]</code>
elements will be overwritten at the beginning of the <code>circular_buffer_space_optimized</code>.<br>
(See <i>Example</i> for the explanation.)<br>
<br>
@@ -2906,9 +2904,9 @@
</dt>
<dd>
Linear (in <code>min[<a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity(),
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity(),
<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> +
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> +
n]</code>).
</dd>
</dl>
@@ -2986,12 +2984,12 @@
Elements from the range <code>[first + max[0, distance(first, last) - (pos - <a href=
"circular_buffer.html#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>) -
<a href=
- "#classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4">reserve()</a>],
+ "#classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f">reserve()</a>],
last)</code> will be inserted at the position <code>pos</code>.<br>
The number of <code>min[pos - <a href=
"circular_buffer.html#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>,
max[0, distance(first, last) - <a href=
- "#classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4">reserve()</a>]]</code>
+ "#classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f">reserve()</a>]]</code>
elements will be overwritten at the beginning of the <code>circular_buffer_space_optimized</code>.<br>
(See <i>Example</i> for the explanation.)<br>
<br>
@@ -3072,11 +3070,11 @@
</dt>
<dd>
Linear (in <code>[<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> +
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> +
std::distance(first, last)]</code>; in <code>min[<a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity(),
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity(),
<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> +
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> +
std::distance(first, last)]</code> if the <code>InputIterator</code> is a <a href=
"http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>).
</dd>
@@ -3291,12 +3289,12 @@
The number of <code>min[n, (<a href=
"circular_buffer.html#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> -
pos) + <a href=
- "#classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4">reserve()</a>]</code>
+ "#classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f">reserve()</a>]</code>
elements will be inserted before the position <code>pos</code>.<br>
The number of <code>min[<a href=
"circular_buffer.html#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> -
pos, max[0, n - <a href=
- "#classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4">reserve()</a>]]</code>
+ "#classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f">reserve()</a>]]</code>
elements will be overwritten at the end of the <code>circular_buffer_space_optimized</code>.<br>
(See <i>Example</i> for the explanation.)<br>
<br>
@@ -3377,9 +3375,9 @@
</dt>
<dd>
Linear (in <code>min[<a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity(),
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity(),
<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> +
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> +
n]</code>).
</dd>
</dl>
@@ -3457,12 +3455,12 @@
Elements from the range <code>[first, last - max[0, distance(first, last) - (<a href=
"circular_buffer.html#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> -
pos) - <a href=
- "#classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4">reserve()</a>])</code>
+ "#classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f">reserve()</a>])</code>
will be inserted before the position <code>pos</code>.<br>
The number of <code>min[<a href=
"circular_buffer.html#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> -
pos, max[0, distance(first, last) - <a href=
- "#classboost_1_1circular__buffer__space__optimized_100d0c06a38f789ae760709cc86420ae4">reserve()</a>]]</code>
+ "#classboost_1_1circular__buffer__space__optimized_170eec72a6e8d088b58e26ac7e2dd7c9f">reserve()</a>]]</code>
elements will be overwritten at the end of the <code><a href=
"circular_buffer.html#classboost_1_1circular__buffer">circular_buffer</a></code>.<br>
(See <i>Example</i> for the explanation.)<br>
@@ -3544,11 +3542,11 @@
</dt>
<dd>
Linear (in <code>[<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> +
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> +
std::distance(first, last)]</code>; in <code>min[<a href=
- "#classboost_1_1circular__buffer__space__optimized_1ea8a89fbae5e03b364ac28e5dc49e353">capacity()</a>.capacity(),
+ "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity(),
<a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> +
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> +
std::distance(first, last)]</code> if the <code>InputIterator</code> is a <a href=
"http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>).
</dd>
@@ -4098,7 +4096,7 @@
</dt>
<dd>
<code><a href=
- "circular_buffer.html#classboost_1_1circular__buffer_1d666f694897465b0d4d7cdd8ddcbc213">size()</a> ==
+ "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> ==
0</code><br>
<br>
The amount of allocated memory in the internal buffer may be predictively decreased.
@@ -4175,24 +4173,13 @@
The idea of the space optimized circular buffer has been introduced by Pavel Vozenilek.
</p>
<hr size="1">
- <table id="footer" border="0" width="100%">
- <tr>
- <td align="left" valign="top">
- <p>
- <small>Copyright © 2003-2007 Jan Gaspar</small>
- </p>
- <p>
- <small>Use, modification, and distribution is subject to the Boost Software License, Version 1.0.<br>
- (See accompanying file <code>LICENSE_1_0.txt</code> or copy at <a href=
- "http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt>)</small>
- </p>
- </td>
- <td align="right" valign="top">
- <a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
- "http://www.w3.org/Icons/valid-html401" alt="This is a Valid HTML 4.01 Transitional Document." height="31"
- width="88"></a>
- </td>
- </tr>
- </table>
+ <p>
+ <small>Copyright © 2003-2007 Jan Gaspar</small>
+ </p>
+ <p>
+ <small>Use, modification, and distribution is subject to the Boost Software License, Version 1.0.<br>
+ (See accompanying file <code>LICENSE_1_0.txt</code> or copy at <a href=
+ "http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt>)</small>
+ </p>
</body>
</html>
Deleted: trunk/libs/circular_buffer/doc/valid-html40.png
==============================================================================
Binary file. No diff available.
Modified: trunk/libs/circular_buffer/test/common.ipp
==============================================================================
--- trunk/libs/circular_buffer/test/common.ipp (original)
+++ trunk/libs/circular_buffer/test/common.ipp 2008-05-21 11:53:50 EDT (Wed, 21 May 2008)
@@ -769,6 +769,17 @@
void constructor_test() {
+ CB_CONTAINER<MyInteger> cb0;
+ BOOST_CHECK(cb0.capacity() == 0);
+ BOOST_CHECK(cb0.size() == 0);
+
+ cb0.push_back(1);
+ cb0.push_back(2);
+ cb0.push_back(3);
+
+ BOOST_CHECK(cb0.size() == 0);
+ BOOST_CHECK(cb0.capacity() == 0);
+
CB_CONTAINER<MyInteger> cb1(3);
CB_CONTAINER<MyInteger> cb2(3, 2);
vector<int> v;
@@ -780,6 +791,7 @@
CB_CONTAINER<MyInteger> cb3(v.begin(), v.end());
CB_CONTAINER<MyInteger> cb4(3, v.begin(), v.end());
CB_CONTAINER<MyInteger> cb5(10, v.begin(), v.end());
+ CB_CONTAINER<MyInteger> cb6(10, 3, MyInteger(2));
BOOST_CHECK(cb1.size() == 0);
BOOST_CHECK(cb1.capacity() == 3);
@@ -803,19 +815,29 @@
BOOST_CHECK(!cb5.full());
BOOST_CHECK(cb5[0] == 1);
BOOST_CHECK(cb5[4] == 5);
+ BOOST_CHECK(cb6.size() == 3);
+ BOOST_CHECK(cb6.capacity() == 10);
+ BOOST_CHECK(!cb6.full());
+ BOOST_CHECK(cb6[0] == 2);
+ BOOST_CHECK(cb6[2] == 2);
cb5.push_back(6);
+ cb6.push_back(6);
BOOST_CHECK(cb5[5] == 6);
+ BOOST_CHECK(cb5[0] == 1);
BOOST_CHECK(cb5.size() == 6);
+ BOOST_CHECK(cb6[3] == 6);
+ BOOST_CHECK(cb6.size() == 4);
+ BOOST_CHECK(cb6[0] == 2);
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
- CB_CONTAINER<int> cb6(MyInputIterator(v.begin()), MyInputIterator(v.end()));
- CB_CONTAINER<int> cb7(3, MyInputIterator(v.begin()), MyInputIterator(v.end()));
+ CB_CONTAINER<int> cb7(MyInputIterator(v.begin()), MyInputIterator(v.end()));
+ CB_CONTAINER<int> cb8(3, MyInputIterator(v.begin()), MyInputIterator(v.end()));
- BOOST_CHECK(cb6.capacity() == 5);
- BOOST_CHECK(cb7.capacity() == 3);
+ BOOST_CHECK(cb7.capacity() == 5);
+ BOOST_CHECK(cb8.capacity() == 3);
#endif // #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
@@ -824,6 +846,7 @@
generic_test(cb3);
generic_test(cb4);
generic_test(cb5);
+ generic_test(cb6);
}
void assign_test() {
@@ -894,6 +917,9 @@
CB_CONTAINER<MyInteger> cb2 = cb1;
BOOST_CHECK(cb1 == cb2);
+ BOOST_CHECK(cb2.capacity() == 4);
+ BOOST_CHECK(cb2[0] == 2);
+ BOOST_CHECK(cb2[3] == 5);
CB_CONTAINER<MyInteger> cb3(20);
cb1.pop_back();
@@ -901,6 +927,7 @@
cb3 = cb2;
cb3 = cb3;
cb4 = cb1;
+ CB_CONTAINER<MyInteger> cb5 = cb1;
BOOST_CHECK(cb3 == cb2);
BOOST_CHECK(cb4 == cb1);
@@ -911,11 +938,16 @@
BOOST_CHECK(cb4.capacity() == 4);
BOOST_CHECK(!cb4.full());
BOOST_CHECK(*(cb4.end() - 1) == 4);
+ BOOST_CHECK(cb1 == cb5);
+ BOOST_CHECK(cb5.capacity() == 4);
+ BOOST_CHECK(cb2[0] == 2);
+ BOOST_CHECK(cb2[2] == 4);
generic_test(cb1);
generic_test(cb2);
generic_test(cb3);
generic_test(cb4);
+ generic_test(cb5);
}
void swap_test() {
Modified: trunk/libs/circular_buffer/test/space_optimized_test.cpp
==============================================================================
--- trunk/libs/circular_buffer/test/space_optimized_test.cpp (original)
+++ trunk/libs/circular_buffer/test/space_optimized_test.cpp 2008-05-21 11:53:50 EDT (Wed, 21 May 2008)
@@ -62,7 +62,7 @@
circular_buffer_space_optimized<int>::capacity_type c1 = 10;
circular_buffer_space_optimized<int>::capacity_type c2 =
- circular_buffer_space_optimized<int>::capacity_type(20, 5);
+ circular_buffer_space_optimized<int>::capacity_type(20, 5);
circular_buffer_space_optimized<int>::capacity_type c3 = c2;
BOOST_CHECK(c1.capacity() == 10);
@@ -78,10 +78,10 @@
BOOST_CHECK(c1.min_capacity() == 5);
}
-void some_constructors_test() {
+void specific_constructors_test() {
cb_space_optimized cb1;
- BOOST_CHECK(cb1.capacity() == cb1.max_size());
+ BOOST_CHECK(cb1.capacity() == 0);
BOOST_CHECK(cb1.capacity().min_capacity() == 0);
BOOST_CHECK(cb1.internal_capacity() == 0);
BOOST_CHECK(cb1.size() == 0);
@@ -90,10 +90,15 @@
cb1.push_back(2);
cb1.push_back(3);
- BOOST_CHECK(cb1.size() == 3);
- BOOST_CHECK(cb1.capacity() == cb1.max_size());
+ BOOST_CHECK(cb1.size() == 0);
+ BOOST_CHECK(cb1.capacity() == 0);
+
+ vector<int> v;
+ v.push_back(1);
+ v.push_back(2);
+ v.push_back(3);
- cb_space_optimized cb2(cb1.begin(), cb1.end());
+ cb_space_optimized cb2(v.begin(), v.end());
BOOST_CHECK(cb2.capacity() == 3);
BOOST_CHECK(cb2.capacity().min_capacity() == 0);
@@ -183,7 +188,7 @@
tests->add(BOOST_TEST_CASE(&min_capacity_test));
tests->add(BOOST_TEST_CASE(&capacity_control_test));
- tests->add(BOOST_TEST_CASE(&some_constructors_test));
+ tests->add(BOOST_TEST_CASE(&specific_constructors_test));
tests->add(BOOST_TEST_CASE(&shrink_to_fit_test));
tests->add(BOOST_TEST_CASE(&iterator_invalidation_test));
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk