Imported Upstream version 1.51.0
[platform/upstream/boost.git] / libs / circular_buffer / doc / circular_buffer.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4   <head>
5     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6     <title>
7       Templated Circular Buffer Container
8     </title>
9     <link rel="stylesheet" href="../../../boost.css" type="text/css">
10   </head>
11   <body>
12     <table id="title" border="0">
13       <tr>
14         <td>
15           <h1>
16             Templated Circular Buffer Container
17           </h1>
18           <h1>
19             circular_buffer&lt;T, Alloc&gt;
20           </h1>
21         </td>
22         <td>
23           <a href="../../../"><img src="../../../boost.png" width="277" height="86" border="0" alt="Boost"></a>
24         </td>
25       </tr>
26     </table>
27     <h2>
28       Contents
29     </h2>
30     <dl>
31       <dt>
32         <a href="#description">Description</a>
33       </dt>
34       <dt>
35         <a href="#briefexample">Introductory Example</a>
36       </dt>
37       <dt>
38         <a href="#synopsis">Synopsis</a>
39       </dt>
40       <dt>
41         <a href="#rationale">Rationale</a>
42       </dt>
43       <dd>
44         <ul>
45           <li>
46             <a href="#threadsafety">Thread-Safety</a>
47           </li>
48           <li>
49             <a href="#overwrite">Overwrite Operation</a>
50           </li>
51           <li>
52             <a href="#fullbuffer">Writing to a Full Buffer</a>
53           </li>
54           <li>
55             <a href="#emptybuffer">Reading/Removing from an Empty Buffer</a>
56           </li>
57           <li>
58             <a href="#iteratorinvalidation">Iterator Invalidation</a>
59           </li>
60         </ul>
61       </dd>
62       <dt>
63         <a href="#caveats">Caveats</a>
64       </dt>
65       <dt>
66         <a href="#debug">Debug Support</a>
67       </dt>
68       <dt>
69         <a href="#interprocess">Compatibility with Interprocess library</a>
70       </dt>
71       <dt>
72         <a href="#examples">More Examples</a>
73       </dt>
74       <dt>
75         <a href="#header">Header Files</a>
76       </dt>
77       <dt>
78         <a href="#model">Modelled Concepts</a>
79       </dt>
80       <dt>
81         <a href="#parameters">Template Parameters</a>
82       </dt>
83       <dt>
84         <a href="#types">Public Types</a>
85       </dt>
86       <dt>
87         <a href="#constructors">Constructors and Destructor</a>
88       </dt>
89       <dt>
90         <a href="#methods">Public Member Functions</a>
91       </dt>
92       <dt>
93         <a href="#functions">Standalone Functions</a>
94       </dt>
95       <dt>
96         <a href="#notes">Notes</a>
97       </dt>
98       <dt>
99         <a href="#see">See also</a>
100       </dt>
101       <dt>
102         <a href="#ack">Acknowledgements</a>
103       </dt>
104       <dt>
105         <a href="#relnotes">Release Notes</a>
106       </dt>
107     </dl>
108     <table id="table_figure" align="right" border="0">
109       <tr>
110         <td>
111           <img src="circular_buffer.png" width="300" height="332" alt="Circular Buffer">
112         </td>
113       </tr>
114       <tr>
115         <td width="300">
116           <table id="table_figure_desc" cellpadding="5" align="right" border="0">
117             <tr>
118               <td valign="top">
119                 <b>Figure:</b>
120               </td>
121               <td valign="top">
122                 The circular buffer (for someone known as <i>ring</i> or <i>cyclic buffer</i>).
123               </td>
124             </tr>
125           </table>
126         </td>
127       </tr>
128     </table>
129     <h2>
130       <a name="description" id="description">Description</a>
131     </h2>
132     <p>
133       In general the term <i>circular buffer</i> refers to an area in memory which is used to store incoming data. When
134       the buffer is filled, new data is written starting at the beginning of the buffer and overwriting the old. (Also
135       see the Figure.)
136     </p>
137     <p>
138       The <code>circular_buffer</code> is a STL compliant container. It is a kind of sequence similar to <code><a href=
139       "http://www.sgi.com/tech/stl/List.html">std::list</a></code> or <code><a href=
140       "http://www.sgi.com/tech/stl/Deque.html">std::deque</a></code>. It supports random access iterators, constant
141       time insert and erase operations at the beginning or the end of the buffer and interoperability with
142       <code>std</code> algorithms. The <code>circular_buffer</code> is especially designed to provide fixed capacity
143       storage. When its capacity is exhausted, newly inserted elements will cause elements either at the beginning or
144       end of the buffer (depending on what insert operation is used) to be overwritten.
145     </p>
146     <p>
147       The <code>circular_buffer</code> only allocates memory when created, when the capacity is adjusted explicitly, or
148       as necessary to accommodate resizing or assign operations. On the other hand, there is also a <code><a href=
149       "space_optimized.html">circular_buffer_space_optimized</a></code> available. It is an adaptor of the
150       <code>circular_buffer</code> which does not allocate memory at once when created, rather it allocates memory as
151       needed.
152     </p>
153     <h2>
154       <a name="briefexample" id="briefexample">Introductory Example</a>
155     </h2>
156     <p>
157       A brief example using the <code>circular_buffer</code>:
158     </p>
159     <pre>
160    #include &lt;boost/circular_buffer.hpp&gt;
161
162    int main(int /*argc*/, char* /*argv*/[]) {
163
164       // Create a circular buffer with a capacity for 3 integers.
165       boost::circular_buffer&lt;int&gt; cb(3);
166
167       // Insert some elements into the buffer.
168       cb.push_back(1);
169       cb.push_back(2);
170       cb.push_back(3);
171
172       int a = cb[0];  // a == 1
173       int b = cb[1];  // b == 2
174       int c = cb[2];  // c == 3
175
176       // The buffer is full now, pushing subsequent
177       // elements will overwrite the front-most elements.
178
179       cb.push_back(4);  // Overwrite 1 with 4.
180       cb.push_back(5);  // Overwrite 2 with 5.
181
182       // The buffer now contains 3, 4 and 5.
183
184       a = cb[0];  // a == 3
185       b = cb[1];  // b == 4
186       c = cb[2];  // c == 5
187
188       // Elements can be popped from either the front or the back.
189
190       cb.pop_back();  // 5 is removed.
191       cb.pop_front(); // 3 is removed.
192
193       int d = cb[0];  // d == 4
194
195       return 0;
196    }
197 </pre>
198     <h2>
199       <a name="synopsis" id="synopsis">Synopsis</a>
200     </h2>
201     <div id="srcdoc_synopsis">
202       <table id="table_synopsis" border="0" cellpadding="10">
203         <tr>
204           <td>
205             <pre>
206 namespace boost {
207
208 template &lt;class <a href="#templateparam_T">T</a>, class <a href="#templateparam_Alloc">Alloc</a>&gt;
209 class circular_buffer
210 {
211 public:
212    typedef typename Alloc::value_type <a href=
213 "#classboost_1_1circular__buffer_1cbdd7ca87e147c08cd2be267eefd6540">value_type</a>;
214    typedef typename Alloc::pointer <a href=
215 "#classboost_1_1circular__buffer_14ff917f8a6131ec18e91606727592a9c">pointer</a>;
216    typedef typename Alloc::const_pointer <a href=
217 "#classboost_1_1circular__buffer_190f7c6bcb624ad507de546366f49028a">const_pointer</a>;
218    typedef typename Alloc::reference <a href=
219 "#classboost_1_1circular__buffer_1f38a9bc64d84757c661c2542ff9a7f65">reference</a>;
220    typedef typename Alloc::const_reference <a href=
221 "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a>;
222    typedef typename Alloc::difference_type <a href=
223 "#classboost_1_1circular__buffer_15313e723fa85d73db5826f8b722aa2a9">difference_type</a>;
224    typedef typename Alloc::size_type <a href=
225 "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a>;
226    typedef Alloc <a href="#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>;
227    typedef <i>implementation-defined</i> <a href=
228 "#classboost_1_1circular__buffer_15cab6d46f03c40d1e52d41843319ddb9">const_iterator</a>;
229    typedef <i>implementation-defined</i> <a href=
230 "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a>;
231    typedef boost::reverse_iterator&lt;const_iterator&gt; <a href=
232 "#classboost_1_1circular__buffer_1c7317701b511bc5f7a663b06b53e2b73">const_reverse_iterator</a>;
233    typedef boost::reverse_iterator&lt;iterator&gt; <a href=
234 "#classboost_1_1circular__buffer_1002fb890dded89e75dfeb6f021fb58a5">reverse_iterator</a>;
235    typedef std::pair&lt;pointer, size_type&gt; <a href=
236 "#classboost_1_1circular__buffer_126d279f91fef717e25459a0817ff242f">array_range</a>;
237    typedef std::pair&lt;const_pointer, size_type&gt; <a href=
238 "#classboost_1_1circular__buffer_11885d7f475b7e7a74c95b2448d243025">const_array_range</a>;
239    typedef size_type <a href="#classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595">capacity_type</a>;
240
241    explicit <a href=
242 "#classboost_1_1circular__buffer_1e53e744d2f94a2bcbfcdb219a9d93300">circular_buffer</a>(const allocator_type&amp; alloc = allocator_type());
243    explicit <a href=
244 "#classboost_1_1circular__buffer_18f1606a26fead923c2cbe068a74e28b6">circular_buffer</a>(capacity_type buffer_capacity, const allocator_type&amp; alloc = allocator_type());
245    <a href=
246 "#classboost_1_1circular__buffer_1fdace8f110d5b7a17c02020757f06fe8">circular_buffer</a>(size_type n, const_reference item, const allocator_type&amp; alloc = allocator_type());
247    <a href=
248 "#classboost_1_1circular__buffer_104dc644486d835b56aa479ec48b52230">circular_buffer</a>(capacity_type buffer_capacity, size_type n, const_reference item, const allocator_type&amp; alloc = allocator_type());
249    <a href=
250 "#classboost_1_1circular__buffer_1e515d8a951eeb18b8cc930300e7e13bd">circular_buffer</a>(const circular_buffer&lt;T, Alloc&gt;&amp; cb);
251    template &lt;class InputIterator&gt;
252       <a href=
253 "#classboost_1_1circular__buffer_1744ec06b06a5a723386b645a29cb8ed2">circular_buffer</a>(InputIterator first, InputIterator last, const allocator_type&amp; alloc = allocator_type());
254    template &lt;class InputIterator&gt;
255       <a href=
256 "#classboost_1_1circular__buffer_1a851f75f4a85b1a2b1a241904d21503f">circular_buffer</a>(capacity_type buffer_capacity, InputIterator first, InputIterator last, const allocator_type&amp; alloc = allocator_type());
257    <a href="#classboost_1_1circular__buffer_164250ffbbbdbc62b99e8301fc195b80c">~circular_buffer</a>();
258
259    allocator_type <a href=
260 "#classboost_1_1circular__buffer_1a20b7d0e7a4da0af13286df9f53d660c">get_allocator</a>() const;
261    allocator_type&amp; <a href="#classboost_1_1circular__buffer_1af7758a36ac2f84a3024b50b4fc7e098">get_allocator</a>();
262    iterator <a href="#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin</a>();
263    iterator <a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end</a>();
264    const_iterator <a href="#classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038">begin</a>() const;
265    const_iterator <a href="#classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac">end</a>() const;
266    reverse_iterator <a href="#classboost_1_1circular__buffer_1db3d6b10b6763549f54d2627228fa7aa">rbegin</a>();
267    reverse_iterator <a href="#classboost_1_1circular__buffer_1cff9236a50107188b8942847a4dc2697">rend</a>();
268    const_reverse_iterator <a href=
269 "#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin</a>() const;
270    const_reverse_iterator <a href="#classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3">rend</a>() const;
271    reference <a href=
272 "#classboost_1_1circular__buffer_1d219f0d3203fb43b964a8cf63f1865cd">operator[]</a>(size_type index);
273    const_reference <a href=
274 "#classboost_1_1circular__buffer_1eb0a7fe7f8a56a4dc4c933b93adfcef4">operator[]</a>(size_type index) const;
275    reference <a href="#classboost_1_1circular__buffer_1cd84838cb4fffb6c113fd0297e502edc">at</a>(size_type index);
276    const_reference <a href=
277 "#classboost_1_1circular__buffer_1b233a298f5845a0fcf2ecc56f4170810">at</a>(size_type index) const;
278    reference <a href="#classboost_1_1circular__buffer_10d5fdeabeb352f47d1f7bb1ea8d9819f">front</a>();
279    reference <a href="#classboost_1_1circular__buffer_1d985d974020f88bb4255d8edbae0a30a">back</a>();
280    const_reference <a href="#classboost_1_1circular__buffer_10df8595d83bb9d8a7ce50aabc678f90b">front</a>() const;
281    const_reference <a href="#classboost_1_1circular__buffer_1027201797868c6274feb6712f670a132">back</a>() const;
282    array_range <a href="#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one</a>();
283    array_range <a href="#classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b">array_two</a>();
284    const_array_range <a href="#classboost_1_1circular__buffer_10f4b157e27b1170a571417986b239945">array_one</a>() const;
285    const_array_range <a href="#classboost_1_1circular__buffer_1bb8eb0f298ad2012c55c5303e1f174d5">array_two</a>() const;
286    pointer <a href="#classboost_1_1circular__buffer_1ea728bf57f91aa8946eddf76ce816a4e">linearize</a>();
287    bool <a href="#classboost_1_1circular__buffer_120f64448dc0723cc68c1096f6b00bc0a">is_linearized</a>() const;
288    void <a href=
289 "#classboost_1_1circular__buffer_1c591bb9e271b10b5240afcff3bd2c619">rotate</a>(const_iterator new_begin);
290    size_type <a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size</a>() const;
291    size_type <a href="#classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7">max_size</a>() const;
292    bool <a href="#classboost_1_1circular__buffer_15be1c2a005ec9828549ef6dd7ebed583">empty</a>() const;
293    bool <a href="#classboost_1_1circular__buffer_1fd0eef8ba91210d1575404b7e3e8207a">full</a>() const;
294    size_type <a href="#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve</a>() const;
295    capacity_type <a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity</a>() const;
296    void <a href=
297 "#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity</a>(capacity_type new_capacity);
298    void <a href=
299 "#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize</a>(size_type new_size, const_reference item = value_type());
300    void <a href=
301 "#classboost_1_1circular__buffer_1477715e9d31d2cc5b02ad8ecf3c68c46">rset_capacity</a>(capacity_type new_capacity);
302    void <a href=
303 "#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize</a>(size_type new_size, const_reference item = value_type());
304    circular_buffer&lt;T, Alloc&gt;&amp; <a href=
305 "#classboost_1_1circular__buffer_1db1558911b2e251a587aeb3d8b3d797d">operator=</a>(const circular_buffer&lt;T, Alloc&gt;&amp; cb);
306    void <a href=
307 "#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign</a>(size_type n, const_reference item);
308    void <a href=
309 "#classboost_1_1circular__buffer_1dbebb80a5f38e52a37ec9f3ed765600a">assign</a>(capacity_type buffer_capacity, size_type n, const_reference item);
310    template &lt;class InputIterator&gt;
311       void <a href=
312 "#classboost_1_1circular__buffer_1253302d9bda5d7efbc4a6c311de3790c">assign</a>(InputIterator first, InputIterator last);
313    template &lt;class InputIterator&gt;
314       void <a href=
315 "#classboost_1_1circular__buffer_127cab6034beeeb0e11863c8c14d14366">assign</a>(capacity_type buffer_capacity, InputIterator first, InputIterator last);
316    void <a href=
317 "#classboost_1_1circular__buffer_1270ab7074c365663a6f18808024fd88b">swap</a>(circular_buffer&lt;T, Alloc&gt;&amp; cb);
318    void <a href=
319 "#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back</a>(const_reference item = value_type());
320    void <a href=
321 "#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front</a>(const_reference item = value_type());
322    void <a href="#classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07">pop_back</a>();
323    void <a href="#classboost_1_1circular__buffer_18ac972dc24ef7236faa1875de92b9dd8">pop_front</a>();
324    iterator <a href=
325 "#classboost_1_1circular__buffer_128c92740fee1b9deb8c69816e389de95">insert</a>(iterator pos, const_reference item = value_type());
326    void <a href=
327 "#classboost_1_1circular__buffer_1b2f197c99d47138db777f0a46783b140">insert</a>(iterator pos, size_type n, const_reference item);
328    template &lt;class InputIterator&gt;
329       void <a href=
330 "#classboost_1_1circular__buffer_1d00091d1d794cab3264b3674e99b33f6">insert</a>(iterator pos, InputIterator first, InputIterator last);
331    iterator <a href=
332 "#classboost_1_1circular__buffer_12c9332f457bf5bb3128463cf528c058c">rinsert</a>(iterator pos, const_reference item = value_type());
333    void <a href=
334 "#classboost_1_1circular__buffer_1a47a5358db1b7d7e4925c16db13d2fc5">rinsert</a>(iterator pos, size_type n, const_reference item);
335    template &lt;class InputIterator&gt;
336       void <a href=
337 "#classboost_1_1circular__buffer_1d6479cbc43a304bdbf04262f957fa323">rinsert</a>(iterator pos, InputIterator first, InputIterator last);
338    iterator <a href="#classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3">erase</a>(iterator pos);
339    iterator <a href=
340 "#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase</a>(iterator first, iterator last);
341    iterator <a href="#classboost_1_1circular__buffer_1b6d4ae77d7445f844e30e78592f1e06f">rerase</a>(iterator pos);
342    iterator <a href=
343 "#classboost_1_1circular__buffer_1b0f98ae303584ded5397f067bbfc911f">rerase</a>(iterator first, iterator last);
344    void <a href="#classboost_1_1circular__buffer_1b25d379cf66ace025036a47ddb344abd">erase_begin</a>(size_type n);
345    void <a href="#classboost_1_1circular__buffer_17485ee7f58b01363170114f2123a48d7">erase_end</a>(size_type n);
346    void <a href="#classboost_1_1circular__buffer_1826f5770a40b8b752eb9587378464d1e">clear</a>();
347 };
348
349 template &lt;class T, class Alloc&gt;
350    bool <a href=
351 "#namespaceboost_1d35871e838359b5215e1cbb353663207">operator==</a>(const circular_buffer&lt;T, Alloc&gt;&amp; lhs, const circular_buffer&lt;T, Alloc&gt;&amp; rhs);
352 template &lt;class T, class Alloc&gt;
353    bool <a href=
354 "#namespaceboost_195b08213f201c2067d8acb024756329d">operator&lt;</a>(const circular_buffer&lt;T, Alloc&gt;&amp; lhs, const circular_buffer&lt;T, Alloc&gt;&amp; rhs);
355 template &lt;class T, class Alloc&gt;
356    bool <a href=
357 "#namespaceboost_1f5717e2f6532581a6492ff1839b18f6d">operator!=</a>(const circular_buffer&lt;T, Alloc&gt;&amp; lhs, const circular_buffer&lt;T, Alloc&gt;&amp; rhs);
358 template &lt;class T, class Alloc&gt;
359    bool <a href=
360 "#namespaceboost_1f575d7a9741c2044424de50c966c12f3">operator&gt;</a>(const circular_buffer&lt;T, Alloc&gt;&amp; lhs, const circular_buffer&lt;T, Alloc&gt;&amp; rhs);
361 template &lt;class T, class Alloc&gt;
362    bool <a href=
363 "#namespaceboost_179abcbacd24b67f08185db54aec8600d">operator&lt;=</a>(const circular_buffer&lt;T, Alloc&gt;&amp; lhs, const circular_buffer&lt;T, Alloc&gt;&amp; rhs);
364 template &lt;class T, class Alloc&gt;
365    bool <a href=
366 "#namespaceboost_11c31150380272af67deebef578c80b05">operator&gt;=</a>(const circular_buffer&lt;T, Alloc&gt;&amp; lhs, const circular_buffer&lt;T, Alloc&gt;&amp; rhs);
367 template &lt;class T, class Alloc&gt;
368    void <a href=
369 "#namespaceboost_14aa8f6a2c9640f3f22e266f0fca85777">swap</a>(circular_buffer&lt;T, Alloc&gt;&amp; lhs, circular_buffer&lt;T, Alloc&gt;&amp; rhs);
370
371 } // namespace boost
372 </pre>
373           </td>
374         </tr>
375       </table>
376     </div>
377     <h2>
378       <a name="rationale" id="rationale">Rationale</a>
379     </h2>
380     <p>
381       The basic motivation behind the <code>circular_buffer</code> was to create a container which would work
382       seamlessly with STL. Additionally, the design of the <code>circular_buffer</code> was guided by the following
383       principles:
384     </p>
385     <ol>
386       <li>Maximum <em>efficiency</em> for envisaged applications.
387       </li>
388       <li>Suitable for <em>general purpose</em> use.
389       </li>
390       <li>The behaviour of the buffer as <em>intuitive</em> as possible.
391       </li>
392       <li>Suitable for <em>specialization</em> by means of adaptors. (The <code><a href=
393       "space_optimized.html">circular_buffer_space_optimized</a></code> is such an example of the adaptor.)
394       </li>
395       <li>Easy to <em>debug</em>. (See <a href="#debug">Debug Support</a> for details.)
396       </li>
397     </ol>
398     <p>
399       In order to achieve maximum efficiency, the <code>circular_buffer</code> stores its elements in a <em>contiguous
400       region of memory</em>, which then enables:
401     </p>
402     <ol>
403       <li>Use of fixed memory and no implicit or unexpected memory allocation.
404       </li>
405       <li>Fast constant-time insertion and removal of elements from the front and back.
406       </li>
407       <li>Fast constant-time random access of elements.
408       </li>
409       <li>Suitability for real-time and performance critical applications.
410       </li>
411     </ol>
412     <p>
413       Possible applications of the <code>circular_buffer</code> include:
414     </p>
415     <ul>
416       <li>Storage of the most recently received samples, overwriting the oldest as new samples arrive.
417       </li>
418       <li>As an underlying container for a <i>bounded buffer</i> (see the <a href="#boundedbuffer">Bounded Buffer
419       Example</a>).
420       </li>
421       <li>A kind of cache storing a specified number of last inserted elements.
422       </li>
423       <li>Efficient fixed capacity FIFO (First In, First Out) or LIFO (Last In, First Out) queue which removes the
424       oldest (inserted as first) elements when full.
425       </li>
426     </ul>
427     <p>
428       The following paragraphs describe issues that had to be considered during the implementation of the
429       <code>circular_buffer</code>:
430     </p>
431     <h4>
432       <a name="threadsafety" id="threadsafety">Thread-Safety</a>
433     </h4>
434     <p>
435       The thread-safety of the <code>circular_buffer</code> is the same as the thread-safety of containers in most STL
436       implementations. This means the <code>circular_buffer</code> is <b>not</b> thread-safe. The thread-safety is
437       guarantied only in the sense that simultaneous accesses to <b>distinct</b> instances of the
438       <code>circular_buffer</code> are safe, and simultaneous read accesses to a shared <code>circular_buffer</code>
439       are safe.
440     </p>
441     <p>
442       If multiple threads access a single <code>circular_buffer</code>, and at least one of the threads may potentially
443       write, then the user is responsible for ensuring mutual exclusion between the threads during the container
444       accesses. The mutual exclusion between the threads can be achieved by wrapping operations of the underlying
445       <code>circular_buffer</code> with a lock acquisition and release. (See the <a href="#boundedbuffer">Bounded
446       Buffer Example</a>.)
447     </p>
448     <h4>
449       <a name="overwrite" id="overwrite">Overwrite Operation</a>
450     </h4>
451     <p>
452       Overwrite operation occurs when an element is inserted into a full <code>circular_buffer</code> - the old element
453       is being overwritten by the new one. There was a discussion what exactly "overwriting of an element" means during
454       the formal review. It may be either a destruction of the original element and a consequent inplace construction
455       of a new element or it may be an assignment of a new element into an old one. The <code>circular_buffer</code>
456       implements <b>assignment</b> because it is more effective.
457     </p>
458     <p>
459       From the point of business logic of a stored element, the destruction/construction operation and assignment
460       usually mean the same. However, in very rare cases (if in any) they may differ. If there is a requirement for
461       elements to be destructed/constructed instead of being assigned, consider implementing a wrapper of the element
462       which would implement the assign operator, and store the wrappers instead. It is necessary to note that storing
463       such wrappers has a drawback. The destruction/construction will be invoked on every assignment of the wrapper -
464       not only when a wrapper is being overwritten (when the buffer is full) but also when the stored wrappers are
465       being shifted (e.g. as a result of insertion into the middle of container).
466     </p>
467     <h4>
468       <a name="fullbuffer" id="fullbuffer">Writing to a Full Buffer</a>
469     </h4>
470     <p>
471       There are several options how to cope with the case if a data source produces more data than can fit in the
472       fixed-sized buffer:
473     </p>
474     <ol>
475       <li>Inform the data source to wait until there is room in the buffer (e.g. by throwing an overflow exception).
476       </li>
477       <li>If the oldest data is the most important, ignore new data from the source until there is room in the buffer
478       again.
479       </li>
480       <li>If the latest data is the most important, write over the oldest data.
481       </li>
482       <li>Let the producer to be responsible for checking the size of the buffer prior writing into it.
483       </li>
484     </ol>
485     <p>
486       It is apparent that the <code>circular_buffer</code> implements the third option. But it may be less apparent it
487       <b>does not</b> implement any other option - especially the first two. One can get an impression that the
488       <code>circular_buffer</code> should implement first three options and offer a mechanism of choosing among them.
489       This impression is wrong. The <code>circular_buffer</code> was designed and optimized to be circular (which means
490       overwriting the oldest data when full). If such a controlling mechanism had been enabled, it would just
491       complicate the matters and the usage of the <code>circular_buffer</code> would be probably less straightforward.
492     </p>
493     <p>
494       Moreover, the first two options (and the fourth option as well) do not require the buffer to be circular at all.
495       If there is a need for the first or second option, consider implementing an adaptor of e.g.
496       <code>std::vector</code>. In this case the <code>circular_buffer</code> is not suitable for adapting, because, in
497       contrary to <code>std::vector</code>, it bears an overhead for its circular behaviour.
498     </p>
499     <h4>
500       <a name="emptybuffer" id="emptybuffer">Reading/Removing from an Empty Buffer</a>
501     </h4>
502     <p>
503       When reading or removing an element from an empty buffer, the buffer should be able to notify the data consumer
504       (e.g. by throwing underflow exception) that there are no elements stored in it. The <code>circular_buffer</code>
505       does not implement such a behaviour for two reasons:
506     </p>
507     <ol>
508       <li>It would introduce performance overhead.
509       </li>
510       <li>No other <code>std</code> container implements it this way.
511       </li>
512     </ol>
513     <p>
514       It is considered to be a bug to read or remove an element (e.g. by calling <code>front()</code> or
515       <code>pop_back()</code>) from an empty <code>std</code> container and from an empty <code>circular_buffer</code>
516       as well. The data consumer has to test if the container is not empty before reading/removing from it. However,
517       when reading from the <code>circular_buffer</code>, there is an option to rely on the <code>at()</code> method
518       which throws an exception when the index is out of range.
519     </p>
520     <h4>
521       <a name="iteratorinvalidation" id="iteratorinvalidation">Iterator Invalidation</a>
522     </h4>
523     <p>
524       An iterator is usually considered to be invalidated if an element, the iterator pointed to, had been removed or
525       overwritten by an another element. This definition is enforced by the <a href="#debug">Debug Support</a> and is
526       documented for every method. However, some applications utilizing <code>circular_buffer</code> may require less
527       strict definition: an iterator is invalid only if it points to an uninitialized memory. Consider following
528       example:
529     </p>
530     <pre>
531    #define BOOST_CB_DISABLE_DEBUG // The Debug Support has to be disabled, otherwise the code produces a runtime error.
532
533    #include &lt;boost/circular_buffer.hpp&gt;
534    #include &lt;assert.h&gt;
535
536    int main(int /*argc*/, char* /*argv*/[]) {
537
538       boost::circular_buffer&lt;int&gt; cb(3);
539
540       cb.push_back(1);
541       cb.push_back(2);
542       cb.push_back(3);
543
544       boost::circular_buffer&lt;int&gt;::iterator it = cb.begin();
545
546       assert(*it == 1);
547
548       cb.push_back(4);
549
550       assert(*it == 4); // The iterator still points to the initialized memory.
551
552       return 0;
553    }
554 </pre>
555     <p>
556       The iterator does not point to the original element any more (and is considered to be invalid from the "strict"
557       point of view) but it still points to the same <em>valid</em> place in the memory. This "soft" definition of
558       iterator invalidation is supported by the <code>circular_buffer</code> but should be considered as an
559       implementation detail rather than a full-fledged feature. The rules when the iterator is still valid can be
560       inferred from the code in <code><a href=
561       "../test/soft_iterator_invalidation.cpp">soft_iterator_invalidation.cpp</a></code>.
562     </p>
563     <h2>
564       <a name="caveats" id="caveats">Caveats</a>
565     </h2>
566     <p>
567       The <code>circular_buffer</code> should not be used for storing pointers to dynamically allocated objects. When a
568       <code>circular_buffer</code> becomes full, further insertion will overwrite the stored pointers - resulting in a
569       <b>memory leak</b>. One recommend alternative is the use of smart pointers <a href="#note1">[1]</a>. (Any
570       container of <code>std::auto_ptr</code> is considered particularly hazardous. <a href="#note2">[2]</a> )
571     </p>
572     <p>
573       While internals of a <code>circular_buffer</code> are circular, iterators are <b>not</b>. Iterators of a
574       <code>circular_buffer</code> are only valid for the range <code>[begin(), end()]</code>. E.g. iterators
575       <code>(begin() - 1)</code> and <code>(end() + 1)</code> are invalid.
576     </p>
577     <h2>
578       <a name="debug" id="debug">Debug Support</a>
579     </h2>
580     <p>
581       In order to help a programmer to avoid and find common bugs, the <code>circular_buffer</code> contains a kind of
582       debug support.
583     </p>
584     <p>
585       The <code>circular_buffer</code> maintains a list of valid iterators. As soon as any element gets destroyed all
586       iterators pointing to this element are removed from this list and explicitly invalidated (an invalidation flag is
587       set). The debug support also consists of many assertions (<a href=
588       "../../utility/assert.html"><code>BOOST_ASSERT</code></a> macros) which ensure the <code>circular_buffer</code>
589       and its iterators are used in the correct manner at runtime. In case an invalid iterator is used the assertion
590       will report an error. The connection of explicit iterator invalidation and assertions makes a very robust debug
591       technique which catches most of the errors.
592     </p>
593     <p>
594       Moreover, the uninitialized memory allocated by <code>circular_buffer</code> is filled with the value
595       <code>0xcc</code> in the debug mode. This can help the programmer when debugging the code to recognize the
596       initialized memory from the uninitialized. For details refer the source code.
597     </p>
598     <p>
599       The debug support is enabled only in the debug mode (when the <code>NDEBUG</code> is not defined). It can also be
600       explicitly disabled (only for <code>circular_buffer</code>) by defining <code>BOOST_CB_DISABLE_DEBUG</code>
601       macro.
602     </p>
603     <h2>
604       <a name="intreprocess" id="interprocess">Compatibility with Interprocess library</a>
605     </h2>
606     <p>
607       The <code>circular_buffer</code> is compatible with the <a href="../../../doc/html/interprocess.html">Boost
608       Interprocess</a> library used for interprocess communication. Considering that the <code>circular_buffer</code>'s
609       debug support relies on 'raw' pointers - which is not permited by the Interprocess library - the code has to
610       compiled with <code>-DBOOST_CB_DISABLE_DEBUG</code> or <code>-DNDEBUG</code> (which disables the
611       <a href="#debug">Debug Support</a>). Not doing that will cause the compilation to fail.
612     </p>
613     <h2>
614       <a name="examples" id="examples">More Examples</a>
615     </h2>
616     <p>
617       The following example includes various usage of the <code>circular_buffer</code>.
618     </p>
619     <pre>
620    #include &lt;boost/circular_buffer.hpp&gt;
621    #include &lt;numeric&gt;
622    #include &lt;assert.h&gt;
623
624    int main(int /*argc*/, char* /*argv*/[])
625    {
626       // create a circular buffer of capacity 3
627       boost::circular_buffer&lt;int&gt; cb(3);
628
629       // insert some elements into the circular buffer
630       cb.push_back(1);
631       cb.push_back(2);
632
633       // assertions
634       assert(cb[0] == 1);
635       assert(cb[1] == 2);
636       assert(!cb.full());
637       assert(cb.size() == 2);
638       assert(cb.capacity() == 3);
639
640       // insert some other elements
641       cb.push_back(3);
642       cb.push_back(4);
643
644       // evaluate the sum
645       int sum = std::accumulate(cb.begin(), cb.end(), 0);
646
647       // assertions
648       assert(cb[0] == 2);
649       assert(cb[1] == 3);
650       assert(cb[2] == 4);
651       assert(*cb.begin() == 2);
652       assert(cb.front() == 2);
653       assert(cb.back() == 4);
654       assert(sum == 9);
655       assert(cb.full());
656       assert(cb.size() == 3);
657       assert(cb.capacity() == 3);
658
659       return 0;
660    }
661 </pre>
662     <p>
663       The <code>circular_buffer</code> has a capacity of three <code>int</code>. Therefore, the size of the buffer will
664       not exceed three. The <code><a href="http://www.sgi.com/tech/stl/accumulate.html">std::accumulate</a></code>
665       algorithm evaluates the sum of the stored elements. The semantics of the <code>circular_buffer</code> can be
666       inferred from the assertions.
667     </p>
668     <h4>
669       <a name="boundedbuffer" id="boundedbuffer">Bounded Buffer Example</a>
670     </h4>
671     <p>
672       The bounded buffer is normally used in a producer-consumer mode when producer threads produce items and store
673       them in the container and consumer threads remove these items and process them. The bounded buffer has to
674       guarantee that producers do not insert items into the container when the container is full, that consumers do not
675       try to remove items when the container is empty, and that each produced item is consumed by exactly one consumer.
676     </p>
677     <p>
678       The example below shows how the <code>circular_buffer</code> can be utilized as an underlying container of the
679       bounded buffer.
680     </p>
681     <pre>
682    #include &lt;boost/circular_buffer.hpp&gt;
683    #include &lt;boost/thread/mutex.hpp&gt;
684    #include &lt;boost/thread/condition.hpp&gt;
685    #include &lt;boost/thread/thread.hpp&gt;
686    #include &lt;boost/call_traits.hpp&gt;
687    #include &lt;boost/progress.hpp&gt;
688    #include &lt;boost/bind.hpp&gt;
689
690    template &lt;class T&gt;
691    class bounded_buffer {
692    public:
693
694       typedef boost::circular_buffer&lt;T&gt; container_type;
695       typedef typename container_type::size_type size_type;
696       typedef typename container_type::value_type value_type;
697       typedef typename boost::call_traits&lt;value_type&gt;::param_type param_type;
698
699       explicit bounded_buffer(size_type capacity) : m_unread(0), m_container(capacity) {}
700
701       void push_front(boost::call_traits&lt;value_type&gt;::param_type item) {
702          // param_type represents the "best" way to pass a parameter of type value_type to a method
703
704          boost::mutex::scoped_lock lock(m_mutex);
705          m_not_full.wait(lock, boost::bind(&amp;bounded_buffer&lt;value_type&gt;::is_not_full, this));
706          m_container.push_front(item);
707          ++m_unread;
708          lock.unlock();
709          m_not_empty.notify_one();
710       }
711
712       void pop_back(value_type* pItem) {
713          boost::mutex::scoped_lock lock(m_mutex);
714          m_not_empty.wait(lock, boost::bind(&amp;bounded_buffer&lt;value_type&gt;::is_not_empty, this));
715          *pItem = m_container[--m_unread];
716          lock.unlock();
717          m_not_full.notify_one();
718       }
719
720    private:
721       bounded_buffer(const bounded_buffer&amp;);              // Disabled copy constructor
722       bounded_buffer&amp; operator = (const bounded_buffer&amp;); // Disabled assign operator
723
724       bool is_not_empty() const { return m_unread &gt; 0; }
725       bool is_not_full() const { return m_unread &lt; m_container.capacity(); }
726
727       size_type m_unread;
728       container_type m_container;
729       boost::mutex m_mutex;
730       boost::condition m_not_empty;
731       boost::condition m_not_full;
732    };
733 </pre>
734     <p>
735       The <code>bounded_buffer</code> relies on <a href="../../thread/doc/">Boost Threads</a> and <a href=
736       "../../bind/bind.html">Boost Bind</a> libraries and <a href="../../utility/call_traits.htm">Boost call_traits</a>
737       utility.
738     </p>
739     <p>
740       The <code>push_front()</code> method is called by the producer thread in order to insert a new item into the
741       buffer. The method locks the mutex and waits until there is a space for the new item. (The mutex is unlocked
742       during the waiting stage and has to be regained when the condition is met.) If there is a space in the buffer
743       available, the execution continues and the method inserts the item at the end of the
744       <code>circular_buffer</code>. Then it increments the number of unread items and unlocks the mutex (in case an
745       exception is thrown before the mutex is unlocked, the mutex is unlocked automatically by the destructor of the
746       <code>scoped_lock</code>). At last the method notifies one of the consumer threads waiting for a new item to be
747       inserted into the buffer.
748     </p>
749     <p>
750       The <code>pop_back()</code> method is called by the consumer thread in order to read the next item from the
751       buffer. The method locks the mutex and waits until there is an unread item in the buffer. If there is at least
752       one unread item, the method decrements the number of unread items and reads the next item from the
753       <code>circular_buffer</code>. Then it unlocks the mutex and notifies one of the producer threads waiting for the
754       buffer to free a space for the next item.
755     </p>
756     <p>
757       The <code>pop_back()</code> method does not remove the item but the item is left in the
758       <code>circular_buffer</code> which then replaces it with a new one (inserted by a producer) when the
759       <code>circular_buffer</code> is full. This technique is more effective than removing the item explicitly by
760       calling the <code>pop_back()</code> method of the <code>circular_buffer</code>. This claim is based on the
761       assumption that an assignment (replacement) of a new item into an old one is more effective than a destruction
762       (removal) of an old item and a consequent inplace construction (insertion) of a new item.
763     </p>
764     <p>
765       For comparison of bounded buffers based on different containers compile and run <a href=
766       "../test/bounded_buffer_comparison.cpp">bounded_buffer_comparison.cpp</a>. The test should reveal the bounded
767       buffer based on the <code>circular_buffer</code> is most effective closely followed by the
768       <code>std::deque</code> based bounded buffer. (In reality the result may differ sometimes because the test is
769       always affected by external factors such as immediate CPU load.)
770     </p>
771     <h2>
772       <a name="header" id="header">Header Files</a>
773     </h2>
774     <p>
775       The <code>circular_buffer</code> is defined in the file <code><a href=
776       "../../../boost/circular_buffer.hpp">boost/circular_buffer.hpp</a></code>. There is also a forward declaration
777       for the <code>circular_buffer</code> in the header file <code><a href=
778       "../../../boost/circular_buffer_fwd.hpp">boost/circular_buffer_fwd.hpp</a></code>.
779     </p>
780     <h2>
781       <a name="model" id="model">Modelled Concepts</a>
782     </h2>
783     <p>
784       <a href="http://www.sgi.com/tech/stl/RandomAccessContainer.html">Random Access Container</a>, <a href=
785       "http://www.sgi.com/tech/stl/FrontInsertionSequence.html">Front Insertion Sequence</a> and <a href=
786       "http://www.sgi.com/tech/stl/BackInsertionSequence.html">Back Insertion Sequence</a>.
787     </p>
788     <h2>
789       <a name="parameters" id="parameters">Template Parameters</a>
790     </h2>
791     <div id="srcdoc_params">
792       <table id="table_template_params" border="1" cellpadding="3">
793         <tr>
794           <th>
795             Parameter
796           </th>
797           <th>
798             Description
799           </th>
800           <th>
801             Default
802           </th>
803         </tr>
804         <tr>
805           <td>
806             <a id="templateparam_T" name="templateparam_T"><code>T</code></a>
807           </td>
808           <td>
809             The type of the elements stored in the <code>circular_buffer</code>.
810             <dl>
811               <dt>
812                 <b>Type Requirements:</b>
813               </dt>
814               <dd>
815                 The <code>T</code> has to be <a href="http://www.sgi.com/tech/stl/Assignable.html">SGIAssignable</a>
816                 (SGI STL defined combination of <a href="../../utility/Assignable.html">Assignable</a> and <a href=
817                 "../../utility/CopyConstructible.html">CopyConstructible</a>). Moreover <code>T</code> has to be
818                 <a href="http://www.sgi.com/tech/stl/DefaultConstructible.html">DefaultConstructible</a> if supplied as
819                 a default parameter when invoking some of the <code>circular_buffer</code>'s methods e.g.
820                 <code>insert(iterator pos, const value_type&amp; item = value_type())</code>. And <a href=
821                 "http://www.sgi.com/tech/stl/EqualityComparable.html">EqualityComparable</a> and/or <a href=
822                 "../../utility/LessThanComparable.html">LessThanComparable</a> if the <code>circular_buffer</code> will
823                 be compared with another container.
824               </dd>
825             </dl>
826           </td>
827           <td>
828             <br>
829           </td>
830         </tr>
831         <tr>
832           <td>
833             <a id="templateparam_Alloc" name="templateparam_Alloc"><code>Alloc</code></a>
834           </td>
835           <td>
836             The allocator type used for all internal memory management.
837             <dl>
838               <dt>
839                 <b>Type Requirements:</b>
840               </dt>
841               <dd>
842                 The <code>Alloc</code> has to meet the allocator requirements imposed by STL.
843               </dd>
844             </dl>
845           </td>
846           <td>
847             <code>std::allocator&lt;T&gt;</code>
848           </td>
849         </tr>
850       </table>
851     </div>
852     <h2>
853       <a name="types" id="types">Public Types</a>
854     </h2>
855     <div id="srcdoc_types">
856       <table id="table_public_types" border="1" cellpadding="3">
857         <tr>
858           <th>
859             Type
860           </th>
861           <th>
862             Description
863           </th>
864         </tr>
865         <tr>
866           <td>
867             <a id="classboost_1_1circular__buffer_1cbdd7ca87e147c08cd2be267eefd6540" name=
868             "classboost_1_1circular__buffer_1cbdd7ca87e147c08cd2be267eefd6540"><code>value_type</code></a>
869           </td>
870           <td>
871             The type of elements stored in the <code>circular_buffer</code>.
872           </td>
873         </tr>
874         <tr>
875           <td>
876             <a id="classboost_1_1circular__buffer_14ff917f8a6131ec18e91606727592a9c" name=
877             "classboost_1_1circular__buffer_14ff917f8a6131ec18e91606727592a9c"><code>pointer</code></a>
878           </td>
879           <td>
880             A pointer to an element.
881           </td>
882         </tr>
883         <tr>
884           <td>
885             <a id="classboost_1_1circular__buffer_190f7c6bcb624ad507de546366f49028a" name=
886             "classboost_1_1circular__buffer_190f7c6bcb624ad507de546366f49028a"><code>const_pointer</code></a>
887           </td>
888           <td>
889             A const pointer to the element.
890           </td>
891         </tr>
892         <tr>
893           <td>
894             <a id="classboost_1_1circular__buffer_1f38a9bc64d84757c661c2542ff9a7f65" name=
895             "classboost_1_1circular__buffer_1f38a9bc64d84757c661c2542ff9a7f65"><code>reference</code></a>
896           </td>
897           <td>
898             A reference to an element.
899           </td>
900         </tr>
901         <tr>
902           <td>
903             <a id="classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910" name=
904             "classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910"><code>const_reference</code></a>
905           </td>
906           <td>
907             A const reference to an element.
908           </td>
909         </tr>
910         <tr>
911           <td>
912             <a id="classboost_1_1circular__buffer_15313e723fa85d73db5826f8b722aa2a9" name=
913             "classboost_1_1circular__buffer_15313e723fa85d73db5826f8b722aa2a9"><code>difference_type</code></a>
914           </td>
915           <td>
916             The distance type. (A signed integral type used to represent the distance between two iterators.)
917           </td>
918         </tr>
919         <tr>
920           <td>
921             <a id="classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00" name=
922             "classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00"><code>size_type</code></a>
923           </td>
924           <td>
925             The size type. (An unsigned integral type that can represent any non-negative value of the container's
926             distance type.)
927           </td>
928         </tr>
929         <tr>
930           <td>
931             <a id="classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7" name=
932             "classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7"><code>allocator_type</code></a>
933           </td>
934           <td>
935             The type of an allocator used in the <code>circular_buffer</code>.
936           </td>
937         </tr>
938         <tr>
939           <td>
940             <a id="classboost_1_1circular__buffer_15cab6d46f03c40d1e52d41843319ddb9" name=
941             "classboost_1_1circular__buffer_15cab6d46f03c40d1e52d41843319ddb9"><code>const_iterator</code></a>
942           </td>
943           <td>
944             A const (random access) iterator used to iterate through the <code>circular_buffer</code>.
945           </td>
946         </tr>
947         <tr>
948           <td>
949             <a id="classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532" name=
950             "classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532"><code>iterator</code></a>
951           </td>
952           <td>
953             A (random access) iterator used to iterate through the <code>circular_buffer</code>.
954           </td>
955         </tr>
956         <tr>
957           <td>
958             <a id="classboost_1_1circular__buffer_1c7317701b511bc5f7a663b06b53e2b73" name=
959             "classboost_1_1circular__buffer_1c7317701b511bc5f7a663b06b53e2b73"><code>const_reverse_iterator</code></a>
960           </td>
961           <td>
962             A const iterator used to iterate backwards through a <code>circular_buffer</code>.
963           </td>
964         </tr>
965         <tr>
966           <td>
967             <a id="classboost_1_1circular__buffer_1002fb890dded89e75dfeb6f021fb58a5" name=
968             "classboost_1_1circular__buffer_1002fb890dded89e75dfeb6f021fb58a5"><code>reverse_iterator</code></a>
969           </td>
970           <td>
971             An iterator used to iterate backwards through a <code>circular_buffer</code>.
972           </td>
973         </tr>
974         <tr>
975           <td>
976             <a id="classboost_1_1circular__buffer_126d279f91fef717e25459a0817ff242f" name=
977             "classboost_1_1circular__buffer_126d279f91fef717e25459a0817ff242f"><code>array_range</code></a>
978           </td>
979           <td>
980             An array range. (A typedef for the <a href=
981             "http://www.sgi.com/tech/stl/pair.html"><code>std::pair</code></a> where its first element is a pointer to
982             a beginning of an array and its second element represents a size of the array.)
983           </td>
984         </tr>
985         <tr>
986           <td>
987             <a id="classboost_1_1circular__buffer_11885d7f475b7e7a74c95b2448d243025" name=
988             "classboost_1_1circular__buffer_11885d7f475b7e7a74c95b2448d243025"><code>const_array_range</code></a>
989           </td>
990           <td>
991             A range of a const array. (A typedef for the <a href=
992             "http://www.sgi.com/tech/stl/pair.html"><code>std::pair</code></a> where its first element is a pointer to
993             a beginning of a const array and its second element represents a size of the const array.)
994           </td>
995         </tr>
996         <tr>
997           <td>
998             <a id="classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595" name=
999             "classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595"><code>capacity_type</code></a>
1000           </td>
1001           <td>
1002             The capacity type. (Same as <code>size_type</code> - defined for consistency with the <a href=
1003             "space_optimized.html"><code>circular_buffer_space_optimized</code></a>.)
1004           </td>
1005         </tr>
1006       </table>
1007     </div>
1008     <h2>
1009       <a name="constructors" id="constructors">Constructors and Destructor</a>
1010     </h2>
1011     <div id="srcdoc_constructors">
1012       <table id="table_constructors" border="1" cellpadding="3">
1013         <tr>
1014           <td>
1015             <a id="classboost_1_1circular__buffer_1e53e744d2f94a2bcbfcdb219a9d93300" name=
1016             "classboost_1_1circular__buffer_1e53e744d2f94a2bcbfcdb219a9d93300"></a><code><b>explicit
1017             circular_buffer(const <a href=
1018             "#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&amp; alloc =
1019             allocator_type());</b></code><br>
1020             <br>
1021             Create an empty <code>circular_buffer</code> with zero capacity.
1022             <dl>
1023               <dt>
1024                 <b>Effect:</b>
1025               </dt>
1026               <dd>
1027                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> == 0
1028                 &amp;&amp; <a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> ==
1029                 0</code>
1030               </dd>
1031             </dl>
1032             <dl>
1033               <dt>
1034                 <b>Parameter(s):</b>
1035               </dt>
1036               <dd>
1037                 <dl compact>
1038                   <dt>
1039                     <code>alloc</code>
1040                   </dt>
1041                   <dd>
1042                     The allocator.
1043                   </dd>
1044                 </dl>
1045               </dd>
1046             </dl>
1047             <dl>
1048               <dt>
1049                 <b>Throws:</b>
1050               </dt>
1051               <dd>
1052                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
1053                 used).
1054               </dd>
1055             </dl>
1056             <dl>
1057               <dt>
1058                 <b>Complexity:</b>
1059               </dt>
1060               <dd>
1061                 Constant.
1062               </dd>
1063             </dl>
1064             <dl>
1065               <dt>
1066                 <b>Warning:</b>
1067               </dt>
1068               <dd>
1069                 Since Boost version 1.36 the behaviour of this constructor has changed. Now the constructor does not
1070                 allocate any memory and both capacity and size are set to zero. Also note when inserting an element
1071                 into a <code>circular_buffer</code> with zero capacity (e.g. by <code><a href=
1072                 "#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back(const_reference)</a></code>
1073                 or <code><a href="#classboost_1_1circular__buffer_128c92740fee1b9deb8c69816e389de95">insert(iterator,
1074                 value_type)</a></code>) nothing will be inserted and the size (as well as capacity) remains zero.
1075               </dd>
1076             </dl>
1077             <dl>
1078               <dt>
1079                 <b>Note:</b>
1080               </dt>
1081               <dd>
1082                 You can explicitly set the capacity by calling the <code><a href=
1083                 "#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity(capacity_type)</a></code>
1084                 method or you can use the other constructor with the capacity specified.
1085               </dd>
1086             </dl>
1087             <dl>
1088               <dt>
1089                 <b>See Also:</b>
1090               </dt>
1091               <dd>
1092                 <code><a href=
1093                 "#classboost_1_1circular__buffer_18f1606a26fead923c2cbe068a74e28b6">circular_buffer(capacity_type,
1094                 const allocator_type&amp; alloc)</a></code>, <code><a href=
1095                 "#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity(capacity_type)</a></code>
1096               </dd>
1097             </dl>
1098           </td>
1099         </tr>
1100         <tr>
1101           <td>
1102             <a id="classboost_1_1circular__buffer_18f1606a26fead923c2cbe068a74e28b6" name=
1103             "classboost_1_1circular__buffer_18f1606a26fead923c2cbe068a74e28b6"></a><code><b>explicit
1104             circular_buffer(<a href=
1105             "#classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595">capacity_type</a> buffer_capacity,
1106             const <a href="#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&amp;
1107             alloc = allocator_type());</b></code><br>
1108             <br>
1109             Create an empty <code>circular_buffer</code> with the specified capacity.
1110             <dl>
1111               <dt>
1112                 <b>Effect:</b>
1113               </dt>
1114               <dd>
1115                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> ==
1116                 buffer_capacity &amp;&amp; <a href=
1117                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == 0</code>
1118               </dd>
1119             </dl>
1120             <dl>
1121               <dt>
1122                 <b>Parameter(s):</b>
1123               </dt>
1124               <dd>
1125                 <dl compact>
1126                   <dt>
1127                     <code>buffer_capacity</code>
1128                   </dt>
1129                   <dd>
1130                     The maximum number of elements which can be stored in the <code>circular_buffer</code>.
1131                   </dd>
1132                 </dl>
1133               </dd>
1134               <dd>
1135                 <dl compact>
1136                   <dt>
1137                     <code>alloc</code>
1138                   </dt>
1139                   <dd>
1140                     The allocator.
1141                   </dd>
1142                 </dl>
1143               </dd>
1144             </dl>
1145             <dl>
1146               <dt>
1147                 <b>Throws:</b>
1148               </dt>
1149               <dd>
1150                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
1151                 used).
1152               </dd>
1153             </dl>
1154             <dl>
1155               <dt>
1156                 <b>Complexity:</b>
1157               </dt>
1158               <dd>
1159                 Constant.
1160               </dd>
1161             </dl>
1162           </td>
1163         </tr>
1164         <tr>
1165           <td>
1166             <a id="classboost_1_1circular__buffer_1fdace8f110d5b7a17c02020757f06fe8" name=
1167             "classboost_1_1circular__buffer_1fdace8f110d5b7a17c02020757f06fe8"></a><code><b>circular_buffer(<a href=
1168             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> n, <a href=
1169             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> item, const
1170             <a href="#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&amp; alloc =
1171             allocator_type());</b></code><br>
1172             <br>
1173             Create a full <code>circular_buffer</code> with the specified capacity and filled with <code>n</code>
1174             copies of <code>item</code>.
1175             <dl>
1176               <dt>
1177                 <b>Effect:</b>
1178               </dt>
1179               <dd>
1180                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> == n
1181                 &amp;&amp; <a href="#classboost_1_1circular__buffer_1fd0eef8ba91210d1575404b7e3e8207a">full()</a>
1182                 &amp;&amp; (*this)[0] == item &amp;&amp; (*this)[1] == item &amp;&amp; ... &amp;&amp; (*this)[n - 1] ==
1183                 item</code>
1184               </dd>
1185             </dl>
1186             <dl>
1187               <dt>
1188                 <b>Parameter(s):</b>
1189               </dt>
1190               <dd>
1191                 <dl compact>
1192                   <dt>
1193                     <code>n</code>
1194                   </dt>
1195                   <dd>
1196                     The number of elements the created <code>circular_buffer</code> will be filled with.
1197                   </dd>
1198                 </dl>
1199               </dd>
1200               <dd>
1201                 <dl compact>
1202                   <dt>
1203                     <code>item</code>
1204                   </dt>
1205                   <dd>
1206                     The element the created <code>circular_buffer</code> will be filled with.
1207                   </dd>
1208                 </dl>
1209               </dd>
1210               <dd>
1211                 <dl compact>
1212                   <dt>
1213                     <code>alloc</code>
1214                   </dt>
1215                   <dd>
1216                     The allocator.
1217                   </dd>
1218                 </dl>
1219               </dd>
1220             </dl>
1221             <dl>
1222               <dt>
1223                 <b>Throws:</b>
1224               </dt>
1225               <dd>
1226                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
1227                 used).
1228               </dd>
1229               <dd>
1230                 Whatever <code>T::T(const T&amp;)</code> throws.
1231               </dd>
1232             </dl>
1233             <dl>
1234               <dt>
1235                 <b>Complexity:</b>
1236               </dt>
1237               <dd>
1238                 Linear (in the <code>n</code>).
1239               </dd>
1240             </dl>
1241           </td>
1242         </tr>
1243         <tr>
1244           <td>
1245             <a id="classboost_1_1circular__buffer_104dc644486d835b56aa479ec48b52230" name=
1246             "classboost_1_1circular__buffer_104dc644486d835b56aa479ec48b52230"></a><code><b>circular_buffer(<a href=
1247             "#classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595">capacity_type</a> buffer_capacity,
1248             <a href="#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> n, <a href=
1249             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> item, const
1250             <a href="#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&amp; alloc =
1251             allocator_type());</b></code><br>
1252             <br>
1253             Create a <code>circular_buffer</code> with the specified capacity and filled with <code>n</code> copies of
1254             <code>item</code>.
1255             <dl>
1256               <dt>
1257                 <b>Precondition:</b>
1258               </dt>
1259               <dd>
1260                 <code>buffer_capacity &gt;= n</code>
1261               </dd>
1262             </dl>
1263             <dl>
1264               <dt>
1265                 <b>Effect:</b>
1266               </dt>
1267               <dd>
1268                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> ==
1269                 buffer_capacity &amp;&amp; <a href=
1270                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == n &amp;&amp;
1271                 (*this)[0] == item &amp;&amp; (*this)[1] == item &amp;&amp; ... &amp;&amp; (*this)[n - 1] ==
1272                 item</code>
1273               </dd>
1274             </dl>
1275             <dl>
1276               <dt>
1277                 <b>Parameter(s):</b>
1278               </dt>
1279               <dd>
1280                 <dl compact>
1281                   <dt>
1282                     <code>buffer_capacity</code>
1283                   </dt>
1284                   <dd>
1285                     The capacity of the created <code>circular_buffer</code>.
1286                   </dd>
1287                 </dl>
1288               </dd>
1289               <dd>
1290                 <dl compact>
1291                   <dt>
1292                     <code>n</code>
1293                   </dt>
1294                   <dd>
1295                     The number of elements the created <code>circular_buffer</code> will be filled with.
1296                   </dd>
1297                 </dl>
1298               </dd>
1299               <dd>
1300                 <dl compact>
1301                   <dt>
1302                     <code>item</code>
1303                   </dt>
1304                   <dd>
1305                     The element the created <code>circular_buffer</code> will be filled with.
1306                   </dd>
1307                 </dl>
1308               </dd>
1309               <dd>
1310                 <dl compact>
1311                   <dt>
1312                     <code>alloc</code>
1313                   </dt>
1314                   <dd>
1315                     The allocator.
1316                   </dd>
1317                 </dl>
1318               </dd>
1319             </dl>
1320             <dl>
1321               <dt>
1322                 <b>Throws:</b>
1323               </dt>
1324               <dd>
1325                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
1326                 used).
1327               </dd>
1328               <dd>
1329                 Whatever <code>T::T(const T&amp;)</code> throws.
1330               </dd>
1331             </dl>
1332             <dl>
1333               <dt>
1334                 <b>Complexity:</b>
1335               </dt>
1336               <dd>
1337                 Linear (in the <code>n</code>).
1338               </dd>
1339             </dl>
1340           </td>
1341         </tr>
1342         <tr>
1343           <td>
1344             <a id="classboost_1_1circular__buffer_1e515d8a951eeb18b8cc930300e7e13bd" name=
1345             "classboost_1_1circular__buffer_1e515d8a951eeb18b8cc930300e7e13bd"></a><code><b>circular_buffer(const
1346             circular_buffer&lt;T,Alloc&gt;&amp; cb);</b></code><br>
1347             <br>
1348             The copy constructor.
1349             <p>
1350               Creates a copy of the specified <code>circular_buffer</code>.
1351             </p>
1352             <dl>
1353               <dt>
1354                 <b>Effect:</b>
1355               </dt>
1356               <dd>
1357                 <code>*this == cb</code>
1358               </dd>
1359             </dl>
1360             <dl>
1361               <dt>
1362                 <b>Parameter(s):</b>
1363               </dt>
1364               <dd>
1365                 <dl compact>
1366                   <dt>
1367                     <code>cb</code>
1368                   </dt>
1369                   <dd>
1370                     The <code>circular_buffer</code> to be copied.
1371                   </dd>
1372                 </dl>
1373               </dd>
1374             </dl>
1375             <dl>
1376               <dt>
1377                 <b>Throws:</b>
1378               </dt>
1379               <dd>
1380                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
1381                 used).
1382               </dd>
1383               <dd>
1384                 Whatever <code>T::T(const T&amp;)</code> throws.
1385               </dd>
1386             </dl>
1387             <dl>
1388               <dt>
1389                 <b>Complexity:</b>
1390               </dt>
1391               <dd>
1392                 Linear (in the size of <code>cb</code>).
1393               </dd>
1394             </dl>
1395           </td>
1396         </tr>
1397         <tr>
1398           <td>
1399             <a id="classboost_1_1circular__buffer_1744ec06b06a5a723386b645a29cb8ed2" name=
1400             "classboost_1_1circular__buffer_1744ec06b06a5a723386b645a29cb8ed2"></a> <code><b>template &lt;class
1401             InputIterator&gt;<br>
1402                 circular_buffer(InputIterator first, InputIterator last, const <a href=
1403             "#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&amp; alloc =
1404             allocator_type());</b></code><br>
1405             <br>
1406             Create a full <code>circular_buffer</code> filled with a copy of the range.
1407             <dl>
1408               <dt>
1409                 <b>Precondition:</b>
1410               </dt>
1411               <dd>
1412                 Valid range <code>[first, last)</code>.<br>
1413                 <code>first</code> and <code>last</code> have to meet the requirements of <a href=
1414                 "http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>.
1415               </dd>
1416             </dl>
1417             <dl>
1418               <dt>
1419                 <b>Effect:</b>
1420               </dt>
1421               <dd>
1422                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> ==
1423                 std::distance(first, last) &amp;&amp; <a href=
1424                 "#classboost_1_1circular__buffer_1fd0eef8ba91210d1575404b7e3e8207a">full()</a> &amp;&amp; (*this)[0]==
1425                 *first &amp;&amp; (*this)[1] == *(first + 1) &amp;&amp; ... &amp;&amp; (*this)[std::distance(first,
1426                 last) - 1] == *(last - 1)</code>
1427               </dd>
1428             </dl>
1429             <dl>
1430               <dt>
1431                 <b>Parameter(s):</b>
1432               </dt>
1433               <dd>
1434                 <dl compact>
1435                   <dt>
1436                     <code>first</code>
1437                   </dt>
1438                   <dd>
1439                     The beginning of the range to be copied.
1440                   </dd>
1441                 </dl>
1442               </dd>
1443               <dd>
1444                 <dl compact>
1445                   <dt>
1446                     <code>last</code>
1447                   </dt>
1448                   <dd>
1449                     The end of the range to be copied.
1450                   </dd>
1451                 </dl>
1452               </dd>
1453               <dd>
1454                 <dl compact>
1455                   <dt>
1456                     <code>alloc</code>
1457                   </dt>
1458                   <dd>
1459                     The allocator.
1460                   </dd>
1461                 </dl>
1462               </dd>
1463             </dl>
1464             <dl>
1465               <dt>
1466                 <b>Throws:</b>
1467               </dt>
1468               <dd>
1469                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
1470                 used).
1471               </dd>
1472               <dd>
1473                 Whatever <code>T::T(const T&amp;)</code> throws.
1474               </dd>
1475             </dl>
1476             <dl>
1477               <dt>
1478                 <b>Complexity:</b>
1479               </dt>
1480               <dd>
1481                 Linear (in the <code>std::distance(first, last)</code>).
1482               </dd>
1483             </dl>
1484           </td>
1485         </tr>
1486         <tr>
1487           <td>
1488             <a id="classboost_1_1circular__buffer_1a851f75f4a85b1a2b1a241904d21503f" name=
1489             "classboost_1_1circular__buffer_1a851f75f4a85b1a2b1a241904d21503f"></a> <code><b>template &lt;class
1490             InputIterator&gt;<br>
1491                 circular_buffer(<a href=
1492             "#classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595">capacity_type</a> buffer_capacity,
1493             InputIterator first, InputIterator last, const <a href=
1494             "#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&amp; alloc =
1495             allocator_type());</b></code><br>
1496             <br>
1497             Create a <code>circular_buffer</code> with the specified capacity and filled with a copy of the range.
1498             <dl>
1499               <dt>
1500                 <b>Precondition:</b>
1501               </dt>
1502               <dd>
1503                 Valid range <code>[first, last)</code>.<br>
1504                 <code>first</code> and <code>last</code> have to meet the requirements of <a href=
1505                 "http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>.
1506               </dd>
1507             </dl>
1508             <dl>
1509               <dt>
1510                 <b>Effect:</b>
1511               </dt>
1512               <dd>
1513                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> ==
1514                 buffer_capacity &amp;&amp; <a href=
1515                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> &lt;=
1516                 std::distance(first, last) &amp;&amp; (*this)[0]== *(last - buffer_capacity) &amp;&amp; (*this)[1] ==
1517                 *(last - buffer_capacity + 1) &amp;&amp; ... &amp;&amp; (*this)[buffer_capacity - 1] == *(last -
1518                 1)</code><br>
1519                 <br>
1520                 If the number of items to be copied from the range <code>[first, last)</code> is greater than the
1521                 specified <code>buffer_capacity</code> then only elements from the range <code>[last - buffer_capacity,
1522                 last)</code> will be copied.
1523               </dd>
1524             </dl>
1525             <dl>
1526               <dt>
1527                 <b>Parameter(s):</b>
1528               </dt>
1529               <dd>
1530                 <dl compact>
1531                   <dt>
1532                     <code>buffer_capacity</code>
1533                   </dt>
1534                   <dd>
1535                     The capacity of the created <code>circular_buffer</code>.
1536                   </dd>
1537                 </dl>
1538               </dd>
1539               <dd>
1540                 <dl compact>
1541                   <dt>
1542                     <code>first</code>
1543                   </dt>
1544                   <dd>
1545                     The beginning of the range to be copied.
1546                   </dd>
1547                 </dl>
1548               </dd>
1549               <dd>
1550                 <dl compact>
1551                   <dt>
1552                     <code>last</code>
1553                   </dt>
1554                   <dd>
1555                     The end of the range to be copied.
1556                   </dd>
1557                 </dl>
1558               </dd>
1559               <dd>
1560                 <dl compact>
1561                   <dt>
1562                     <code>alloc</code>
1563                   </dt>
1564                   <dd>
1565                     The allocator.
1566                   </dd>
1567                 </dl>
1568               </dd>
1569             </dl>
1570             <dl>
1571               <dt>
1572                 <b>Throws:</b>
1573               </dt>
1574               <dd>
1575                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
1576                 used).
1577               </dd>
1578               <dd>
1579                 Whatever <code>T::T(const T&amp;)</code> throws.
1580               </dd>
1581             </dl>
1582             <dl>
1583               <dt>
1584                 <b>Complexity:</b>
1585               </dt>
1586               <dd>
1587                 Linear (in <code>std::distance(first, last)</code>; in <code>min[capacity, std::distance(first,
1588                 last)]</code> if the <code>InputIterator</code> is a <a href=
1589                 "http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>).
1590               </dd>
1591             </dl>
1592           </td>
1593         </tr>
1594         <tr>
1595           <td>
1596             <a id="classboost_1_1circular__buffer_164250ffbbbdbc62b99e8301fc195b80c" name=
1597             "classboost_1_1circular__buffer_164250ffbbbdbc62b99e8301fc195b80c"></a><code><b>~circular_buffer();</b></code><br>
1598
1599             <br>
1600             The destructor.
1601             <p>
1602               Destroys the <code>circular_buffer</code>.
1603             </p>
1604             <dl>
1605               <dt>
1606                 <b>Throws:</b>
1607               </dt>
1608               <dd>
1609                 Nothing.
1610               </dd>
1611             </dl>
1612             <dl>
1613               <dt>
1614                 <b>Iterator Invalidation:</b>
1615               </dt>
1616               <dd>
1617                 Invalidates all iterators pointing to the <code>circular_buffer</code> (including iterators equal to
1618                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>).
1619               </dd>
1620             </dl>
1621             <dl>
1622               <dt>
1623                 <b>Complexity:</b>
1624               </dt>
1625               <dd>
1626                 Constant (in the size of the <code>circular_buffer</code>) for scalar types; linear for other types.
1627               </dd>
1628             </dl>
1629             <dl>
1630               <dt>
1631                 <b>See Also:</b>
1632               </dt>
1633               <dd>
1634                 <code><a href="#classboost_1_1circular__buffer_1826f5770a40b8b752eb9587378464d1e">clear()</a></code>
1635               </dd>
1636             </dl>
1637           </td>
1638         </tr>
1639       </table>
1640     </div>
1641     <h2>
1642       <a name="methods" id="methods">Public Member Functions</a>
1643     </h2>
1644     <div id="srcdoc_methods">
1645       <table id="table_methods" border="1" cellpadding="3">
1646         <tr>
1647           <td>
1648             <a id="classboost_1_1circular__buffer_1a20b7d0e7a4da0af13286df9f53d660c" name=
1649             "classboost_1_1circular__buffer_1a20b7d0e7a4da0af13286df9f53d660c"></a><code><b><a href=
1650             "#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a> get_allocator()
1651             const;</b></code><br>
1652             <br>
1653             Get the allocator.
1654             <dl>
1655               <dt>
1656                 <b>Returns:</b>
1657               </dt>
1658               <dd>
1659                 The allocator.
1660               </dd>
1661             </dl>
1662             <dl>
1663               <dt>
1664                 <b>Throws:</b>
1665               </dt>
1666               <dd>
1667                 Nothing.
1668               </dd>
1669             </dl>
1670             <dl>
1671               <dt>
1672                 <b>Exception Safety:</b>
1673               </dt>
1674               <dd>
1675                 No-throw.
1676               </dd>
1677             </dl>
1678             <dl>
1679               <dt>
1680                 <b>Iterator Invalidation:</b>
1681               </dt>
1682               <dd>
1683                 Does not invalidate any iterators.
1684               </dd>
1685             </dl>
1686             <dl>
1687               <dt>
1688                 <b>Complexity:</b>
1689               </dt>
1690               <dd>
1691                 Constant (in the size of the <code>circular_buffer</code>).
1692               </dd>
1693             </dl>
1694             <dl>
1695               <dt>
1696                 <b>See Also:</b>
1697               </dt>
1698               <dd>
1699                 <code><a href=
1700                 "#classboost_1_1circular__buffer_1af7758a36ac2f84a3024b50b4fc7e098">get_allocator()</a></code> for
1701                 obtaining an allocator reference.
1702               </dd>
1703             </dl>
1704           </td>
1705         </tr>
1706         <tr>
1707           <td>
1708             <a id="classboost_1_1circular__buffer_1af7758a36ac2f84a3024b50b4fc7e098" name=
1709             "classboost_1_1circular__buffer_1af7758a36ac2f84a3024b50b4fc7e098"></a><code><b><a href=
1710             "#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&amp;
1711             get_allocator();</b></code><br>
1712             <br>
1713             Get the allocator reference.
1714             <dl>
1715               <dt>
1716                 <b>Returns:</b>
1717               </dt>
1718               <dd>
1719                 A reference to the allocator.
1720               </dd>
1721             </dl>
1722             <dl>
1723               <dt>
1724                 <b>Throws:</b>
1725               </dt>
1726               <dd>
1727                 Nothing.
1728               </dd>
1729             </dl>
1730             <dl>
1731               <dt>
1732                 <b>Exception Safety:</b>
1733               </dt>
1734               <dd>
1735                 No-throw.
1736               </dd>
1737             </dl>
1738             <dl>
1739               <dt>
1740                 <b>Iterator Invalidation:</b>
1741               </dt>
1742               <dd>
1743                 Does not invalidate any iterators.
1744               </dd>
1745             </dl>
1746             <dl>
1747               <dt>
1748                 <b>Complexity:</b>
1749               </dt>
1750               <dd>
1751                 Constant (in the size of the <code>circular_buffer</code>).
1752               </dd>
1753             </dl>
1754             <dl>
1755               <dt>
1756                 <b>Note:</b>
1757               </dt>
1758               <dd>
1759                 This method was added in order to optimize obtaining of the allocator with a state, although use of
1760                 stateful allocators in STL is discouraged.
1761               </dd>
1762             </dl>
1763             <dl>
1764               <dt>
1765                 <b>See Also:</b>
1766               </dt>
1767               <dd>
1768                 <code><a href="#classboost_1_1circular__buffer_1a20b7d0e7a4da0af13286df9f53d660c">get_allocator()
1769                 const</a></code>
1770               </dd>
1771             </dl>
1772           </td>
1773         </tr>
1774         <tr>
1775           <td>
1776             <a id="classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0" name=
1777             "classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0"></a><code><b><a href=
1778             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> begin();</b></code><br>
1779             <br>
1780             Get the iterator pointing to the beginning of the <code>circular_buffer</code>.
1781             <dl>
1782               <dt>
1783                 <b>Returns:</b>
1784               </dt>
1785               <dd>
1786                 A random access iterator pointing to the first element of the <code>circular_buffer</code>. If the
1787                 <code>circular_buffer</code> is empty it returns an iterator equal to the one returned by
1788                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>.
1789               </dd>
1790             </dl>
1791             <dl>
1792               <dt>
1793                 <b>Throws:</b>
1794               </dt>
1795               <dd>
1796                 Nothing.
1797               </dd>
1798             </dl>
1799             <dl>
1800               <dt>
1801                 <b>Exception Safety:</b>
1802               </dt>
1803               <dd>
1804                 No-throw.
1805               </dd>
1806             </dl>
1807             <dl>
1808               <dt>
1809                 <b>Iterator Invalidation:</b>
1810               </dt>
1811               <dd>
1812                 Does not invalidate any iterators.
1813               </dd>
1814             </dl>
1815             <dl>
1816               <dt>
1817                 <b>Complexity:</b>
1818               </dt>
1819               <dd>
1820                 Constant (in the size of the <code>circular_buffer</code>).
1821               </dd>
1822             </dl>
1823             <dl>
1824               <dt>
1825                 <b>See Also:</b>
1826               </dt>
1827               <dd>
1828                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>,
1829                 <code><a href="#classboost_1_1circular__buffer_1db3d6b10b6763549f54d2627228fa7aa">rbegin()</a></code>,
1830                 <code><a href="#classboost_1_1circular__buffer_1cff9236a50107188b8942847a4dc2697">rend()</a></code>
1831               </dd>
1832             </dl>
1833           </td>
1834         </tr>
1835         <tr>
1836           <td>
1837             <a id="classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1" name=
1838             "classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1"></a><code><b><a href=
1839             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> end();</b></code><br>
1840             <br>
1841             Get the iterator pointing to the end of the <code>circular_buffer</code>.
1842             <dl>
1843               <dt>
1844                 <b>Returns:</b>
1845               </dt>
1846               <dd>
1847                 A random access iterator pointing to the element "one behind" the last element of the
1848                 <code>circular_buffer</code>. If the <code>circular_buffer</code> is empty it returns an iterator equal
1849                 to the one returned by <code><a href=
1850                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a></code>.
1851               </dd>
1852             </dl>
1853             <dl>
1854               <dt>
1855                 <b>Throws:</b>
1856               </dt>
1857               <dd>
1858                 Nothing.
1859               </dd>
1860             </dl>
1861             <dl>
1862               <dt>
1863                 <b>Exception Safety:</b>
1864               </dt>
1865               <dd>
1866                 No-throw.
1867               </dd>
1868             </dl>
1869             <dl>
1870               <dt>
1871                 <b>Iterator Invalidation:</b>
1872               </dt>
1873               <dd>
1874                 Does not invalidate any iterators.
1875               </dd>
1876             </dl>
1877             <dl>
1878               <dt>
1879                 <b>Complexity:</b>
1880               </dt>
1881               <dd>
1882                 Constant (in the size of the <code>circular_buffer</code>).
1883               </dd>
1884             </dl>
1885             <dl>
1886               <dt>
1887                 <b>See Also:</b>
1888               </dt>
1889               <dd>
1890                 <code><a href="#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a></code>,
1891                 <code><a href="#classboost_1_1circular__buffer_1db3d6b10b6763549f54d2627228fa7aa">rbegin()</a></code>,
1892                 <code><a href="#classboost_1_1circular__buffer_1cff9236a50107188b8942847a4dc2697">rend()</a></code>
1893               </dd>
1894             </dl>
1895           </td>
1896         </tr>
1897         <tr>
1898           <td>
1899             <a id="classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038" name=
1900             "classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038"></a><code><b><a href=
1901             "#classboost_1_1circular__buffer_15cab6d46f03c40d1e52d41843319ddb9">const_iterator</a> begin()
1902             const;</b></code><br>
1903             <br>
1904             Get the const iterator pointing to the beginning of the <code>circular_buffer</code>.
1905             <dl>
1906               <dt>
1907                 <b>Returns:</b>
1908               </dt>
1909               <dd>
1910                 A const random access iterator pointing to the first element of the <code>circular_buffer</code>. If
1911                 the <code>circular_buffer</code> is empty it returns an iterator equal to the one returned by
1912                 <code><a href="#classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac">end()
1913                 const</a></code>.
1914               </dd>
1915             </dl>
1916             <dl>
1917               <dt>
1918                 <b>Throws:</b>
1919               </dt>
1920               <dd>
1921                 Nothing.
1922               </dd>
1923             </dl>
1924             <dl>
1925               <dt>
1926                 <b>Exception Safety:</b>
1927               </dt>
1928               <dd>
1929                 No-throw.
1930               </dd>
1931             </dl>
1932             <dl>
1933               <dt>
1934                 <b>Iterator Invalidation:</b>
1935               </dt>
1936               <dd>
1937                 Does not invalidate any iterators.
1938               </dd>
1939             </dl>
1940             <dl>
1941               <dt>
1942                 <b>Complexity:</b>
1943               </dt>
1944               <dd>
1945                 Constant (in the size of the <code>circular_buffer</code>).
1946               </dd>
1947             </dl>
1948             <dl>
1949               <dt>
1950                 <b>See Also:</b>
1951               </dt>
1952               <dd>
1953                 <code><a href="#classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac">end()
1954                 const</a></code>, <code><a href=
1955                 "#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin() const</a></code>,
1956                 <code><a href="#classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3">rend()
1957                 const</a></code>
1958               </dd>
1959             </dl>
1960           </td>
1961         </tr>
1962         <tr>
1963           <td>
1964             <a id="classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac" name=
1965             "classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac"></a><code><b><a href=
1966             "#classboost_1_1circular__buffer_15cab6d46f03c40d1e52d41843319ddb9">const_iterator</a> end()
1967             const;</b></code><br>
1968             <br>
1969             Get the const iterator pointing to the end of the <code>circular_buffer</code>.
1970             <dl>
1971               <dt>
1972                 <b>Returns:</b>
1973               </dt>
1974               <dd>
1975                 A const random access iterator pointing to the element "one behind" the last element of the
1976                 <code>circular_buffer</code>. If the <code>circular_buffer</code> is empty it returns an iterator equal
1977                 to the one returned by <code><a href=
1978                 "#classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038">begin() const</a></code> const.
1979               </dd>
1980             </dl>
1981             <dl>
1982               <dt>
1983                 <b>Throws:</b>
1984               </dt>
1985               <dd>
1986                 Nothing.
1987               </dd>
1988             </dl>
1989             <dl>
1990               <dt>
1991                 <b>Exception Safety:</b>
1992               </dt>
1993               <dd>
1994                 No-throw.
1995               </dd>
1996             </dl>
1997             <dl>
1998               <dt>
1999                 <b>Iterator Invalidation:</b>
2000               </dt>
2001               <dd>
2002                 Does not invalidate any iterators.
2003               </dd>
2004             </dl>
2005             <dl>
2006               <dt>
2007                 <b>Complexity:</b>
2008               </dt>
2009               <dd>
2010                 Constant (in the size of the <code>circular_buffer</code>).
2011               </dd>
2012             </dl>
2013             <dl>
2014               <dt>
2015                 <b>See Also:</b>
2016               </dt>
2017               <dd>
2018                 <code><a href="#classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038">begin()
2019                 const</a></code>, <code><a href=
2020                 "#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin() const</a></code>,
2021                 <code><a href="#classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3">rend()
2022                 const</a></code>
2023               </dd>
2024             </dl>
2025           </td>
2026         </tr>
2027         <tr>
2028           <td>
2029             <a id="classboost_1_1circular__buffer_1db3d6b10b6763549f54d2627228fa7aa" name=
2030             "classboost_1_1circular__buffer_1db3d6b10b6763549f54d2627228fa7aa"></a><code><b><a href=
2031             "#classboost_1_1circular__buffer_1002fb890dded89e75dfeb6f021fb58a5">reverse_iterator</a>
2032             rbegin();</b></code><br>
2033             <br>
2034             Get the iterator pointing to the beginning of the "reversed" <code>circular_buffer</code>.
2035             <dl>
2036               <dt>
2037                 <b>Returns:</b>
2038               </dt>
2039               <dd>
2040                 A reverse random access iterator pointing to the last element of the <code>circular_buffer</code>. If
2041                 the <code>circular_buffer</code> is empty it returns an iterator equal to the one returned by
2042                 <code><a href="#classboost_1_1circular__buffer_1cff9236a50107188b8942847a4dc2697">rend()</a></code>.
2043               </dd>
2044             </dl>
2045             <dl>
2046               <dt>
2047                 <b>Throws:</b>
2048               </dt>
2049               <dd>
2050                 Nothing.
2051               </dd>
2052             </dl>
2053             <dl>
2054               <dt>
2055                 <b>Exception Safety:</b>
2056               </dt>
2057               <dd>
2058                 No-throw.
2059               </dd>
2060             </dl>
2061             <dl>
2062               <dt>
2063                 <b>Iterator Invalidation:</b>
2064               </dt>
2065               <dd>
2066                 Does not invalidate any iterators.
2067               </dd>
2068             </dl>
2069             <dl>
2070               <dt>
2071                 <b>Complexity:</b>
2072               </dt>
2073               <dd>
2074                 Constant (in the size of the <code>circular_buffer</code>).
2075               </dd>
2076             </dl>
2077             <dl>
2078               <dt>
2079                 <b>See Also:</b>
2080               </dt>
2081               <dd>
2082                 <code><a href="#classboost_1_1circular__buffer_1cff9236a50107188b8942847a4dc2697">rend()</a></code>,
2083                 <code><a href="#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a></code>,
2084                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>
2085               </dd>
2086             </dl>
2087           </td>
2088         </tr>
2089         <tr>
2090           <td>
2091             <a id="classboost_1_1circular__buffer_1cff9236a50107188b8942847a4dc2697" name=
2092             "classboost_1_1circular__buffer_1cff9236a50107188b8942847a4dc2697"></a><code><b><a href=
2093             "#classboost_1_1circular__buffer_1002fb890dded89e75dfeb6f021fb58a5">reverse_iterator</a>
2094             rend();</b></code><br>
2095             <br>
2096             Get the iterator pointing to the end of the "reversed" <code>circular_buffer</code>.
2097             <dl>
2098               <dt>
2099                 <b>Returns:</b>
2100               </dt>
2101               <dd>
2102                 A reverse random access iterator pointing to the element "one before" the first element of the
2103                 <code>circular_buffer</code>. If the <code>circular_buffer</code> is empty it returns an iterator equal
2104                 to the one returned by <code><a href=
2105                 "#classboost_1_1circular__buffer_1db3d6b10b6763549f54d2627228fa7aa">rbegin()</a></code>.
2106               </dd>
2107             </dl>
2108             <dl>
2109               <dt>
2110                 <b>Throws:</b>
2111               </dt>
2112               <dd>
2113                 Nothing.
2114               </dd>
2115             </dl>
2116             <dl>
2117               <dt>
2118                 <b>Exception Safety:</b>
2119               </dt>
2120               <dd>
2121                 No-throw.
2122               </dd>
2123             </dl>
2124             <dl>
2125               <dt>
2126                 <b>Iterator Invalidation:</b>
2127               </dt>
2128               <dd>
2129                 Does not invalidate any iterators.
2130               </dd>
2131             </dl>
2132             <dl>
2133               <dt>
2134                 <b>Complexity:</b>
2135               </dt>
2136               <dd>
2137                 Constant (in the size of the <code>circular_buffer</code>).
2138               </dd>
2139             </dl>
2140             <dl>
2141               <dt>
2142                 <b>See Also:</b>
2143               </dt>
2144               <dd>
2145                 <code><a href="#classboost_1_1circular__buffer_1db3d6b10b6763549f54d2627228fa7aa">rbegin()</a></code>,
2146                 <code><a href="#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a></code>,
2147                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>
2148               </dd>
2149             </dl>
2150           </td>
2151         </tr>
2152         <tr>
2153           <td>
2154             <a id="classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026" name=
2155             "classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026"></a><code><b><a href=
2156             "#classboost_1_1circular__buffer_1c7317701b511bc5f7a663b06b53e2b73">const_reverse_iterator</a> rbegin()
2157             const;</b></code><br>
2158             <br>
2159             Get the const iterator pointing to the beginning of the "reversed" <code>circular_buffer</code>.
2160             <dl>
2161               <dt>
2162                 <b>Returns:</b>
2163               </dt>
2164               <dd>
2165                 A const reverse random access iterator pointing to the last element of the
2166                 <code>circular_buffer</code>. If the <code>circular_buffer</code> is empty it returns an iterator equal
2167                 to the one returned by <code><a href=
2168                 "#classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3">rend() const</a></code>.
2169               </dd>
2170             </dl>
2171             <dl>
2172               <dt>
2173                 <b>Throws:</b>
2174               </dt>
2175               <dd>
2176                 Nothing.
2177               </dd>
2178             </dl>
2179             <dl>
2180               <dt>
2181                 <b>Exception Safety:</b>
2182               </dt>
2183               <dd>
2184                 No-throw.
2185               </dd>
2186             </dl>
2187             <dl>
2188               <dt>
2189                 <b>Iterator Invalidation:</b>
2190               </dt>
2191               <dd>
2192                 Does not invalidate any iterators.
2193               </dd>
2194             </dl>
2195             <dl>
2196               <dt>
2197                 <b>Complexity:</b>
2198               </dt>
2199               <dd>
2200                 Constant (in the size of the <code>circular_buffer</code>).
2201               </dd>
2202             </dl>
2203             <dl>
2204               <dt>
2205                 <b>See Also:</b>
2206               </dt>
2207               <dd>
2208                 <code><a href="#classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3">rend()
2209                 const</a></code>, <code><a href=
2210                 "#classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038">begin() const</a></code>,
2211                 <code><a href="#classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac">end()
2212                 const</a></code>
2213               </dd>
2214             </dl>
2215           </td>
2216         </tr>
2217         <tr>
2218           <td>
2219             <a id="classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3" name=
2220             "classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3"></a><code><b><a href=
2221             "#classboost_1_1circular__buffer_1c7317701b511bc5f7a663b06b53e2b73">const_reverse_iterator</a> rend()
2222             const;</b></code><br>
2223             <br>
2224             Get the const iterator pointing to the end of the "reversed" <code>circular_buffer</code>.
2225             <dl>
2226               <dt>
2227                 <b>Returns:</b>
2228               </dt>
2229               <dd>
2230                 A const reverse random access iterator pointing to the element "one before" the first element of the
2231                 <code>circular_buffer</code>. If the <code>circular_buffer</code> is empty it returns an iterator equal
2232                 to the one returned by <code><a href=
2233                 "#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin() const</a></code>.
2234               </dd>
2235             </dl>
2236             <dl>
2237               <dt>
2238                 <b>Throws:</b>
2239               </dt>
2240               <dd>
2241                 Nothing.
2242               </dd>
2243             </dl>
2244             <dl>
2245               <dt>
2246                 <b>Exception Safety:</b>
2247               </dt>
2248               <dd>
2249                 No-throw.
2250               </dd>
2251             </dl>
2252             <dl>
2253               <dt>
2254                 <b>Iterator Invalidation:</b>
2255               </dt>
2256               <dd>
2257                 Does not invalidate any iterators.
2258               </dd>
2259             </dl>
2260             <dl>
2261               <dt>
2262                 <b>Complexity:</b>
2263               </dt>
2264               <dd>
2265                 Constant (in the size of the <code>circular_buffer</code>).
2266               </dd>
2267             </dl>
2268             <dl>
2269               <dt>
2270                 <b>See Also:</b>
2271               </dt>
2272               <dd>
2273                 <code><a href="#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin()
2274                 const</a></code>, <code><a href=
2275                 "#classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038">begin() const</a></code>,
2276                 <code><a href="#classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac">end()
2277                 const</a></code>
2278               </dd>
2279             </dl>
2280           </td>
2281         </tr>
2282         <tr>
2283           <td>
2284             <a id="classboost_1_1circular__buffer_1d219f0d3203fb43b964a8cf63f1865cd" name=
2285             "classboost_1_1circular__buffer_1d219f0d3203fb43b964a8cf63f1865cd"></a><code><b><a href=
2286             "#classboost_1_1circular__buffer_1f38a9bc64d84757c661c2542ff9a7f65">reference</a> operator[](<a href=
2287             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> index);</b></code><br>
2288             <br>
2289             Get the element at the <code>index</code> position.
2290             <dl>
2291               <dt>
2292                 <b>Precondition:</b>
2293               </dt>
2294               <dd>
2295                 <code>0 &lt;= index &amp;&amp; index &lt; <a href=
2296                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>
2297               </dd>
2298             </dl>
2299             <dl>
2300               <dt>
2301                 <b>Parameter(s):</b>
2302               </dt>
2303               <dd>
2304                 <dl compact>
2305                   <dt>
2306                     <code>index</code>
2307                   </dt>
2308                   <dd>
2309                     The position of the element.
2310                   </dd>
2311                 </dl>
2312               </dd>
2313             </dl>
2314             <dl>
2315               <dt>
2316                 <b>Returns:</b>
2317               </dt>
2318               <dd>
2319                 A reference to the element at the <code>index</code> position.
2320               </dd>
2321             </dl>
2322             <dl>
2323               <dt>
2324                 <b>Throws:</b>
2325               </dt>
2326               <dd>
2327                 Nothing.
2328               </dd>
2329             </dl>
2330             <dl>
2331               <dt>
2332                 <b>Exception Safety:</b>
2333               </dt>
2334               <dd>
2335                 No-throw.
2336               </dd>
2337             </dl>
2338             <dl>
2339               <dt>
2340                 <b>Iterator Invalidation:</b>
2341               </dt>
2342               <dd>
2343                 Does not invalidate any iterators.
2344               </dd>
2345             </dl>
2346             <dl>
2347               <dt>
2348                 <b>Complexity:</b>
2349               </dt>
2350               <dd>
2351                 Constant (in the size of the <code>circular_buffer</code>).
2352               </dd>
2353             </dl>
2354             <dl>
2355               <dt>
2356                 <b>See Also:</b>
2357               </dt>
2358               <dd>
2359                 <code><a href="#classboost_1_1circular__buffer_1cd84838cb4fffb6c113fd0297e502edc">at()</a></code>
2360               </dd>
2361             </dl>
2362           </td>
2363         </tr>
2364         <tr>
2365           <td>
2366             <a id="classboost_1_1circular__buffer_1eb0a7fe7f8a56a4dc4c933b93adfcef4" name=
2367             "classboost_1_1circular__buffer_1eb0a7fe7f8a56a4dc4c933b93adfcef4"></a><code><b><a href=
2368             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> operator[](<a href=
2369             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> index)
2370             const;</b></code><br>
2371             <br>
2372             Get the element at the <code>index</code> position.
2373             <dl>
2374               <dt>
2375                 <b>Precondition:</b>
2376               </dt>
2377               <dd>
2378                 <code>0 &lt;= index &amp;&amp; index &lt; <a href=
2379                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>
2380               </dd>
2381             </dl>
2382             <dl>
2383               <dt>
2384                 <b>Parameter(s):</b>
2385               </dt>
2386               <dd>
2387                 <dl compact>
2388                   <dt>
2389                     <code>index</code>
2390                   </dt>
2391                   <dd>
2392                     The position of the element.
2393                   </dd>
2394                 </dl>
2395               </dd>
2396             </dl>
2397             <dl>
2398               <dt>
2399                 <b>Returns:</b>
2400               </dt>
2401               <dd>
2402                 A const reference to the element at the <code>index</code> position.
2403               </dd>
2404             </dl>
2405             <dl>
2406               <dt>
2407                 <b>Throws:</b>
2408               </dt>
2409               <dd>
2410                 Nothing.
2411               </dd>
2412             </dl>
2413             <dl>
2414               <dt>
2415                 <b>Exception Safety:</b>
2416               </dt>
2417               <dd>
2418                 No-throw.
2419               </dd>
2420             </dl>
2421             <dl>
2422               <dt>
2423                 <b>Iterator Invalidation:</b>
2424               </dt>
2425               <dd>
2426                 Does not invalidate any iterators.
2427               </dd>
2428             </dl>
2429             <dl>
2430               <dt>
2431                 <b>Complexity:</b>
2432               </dt>
2433               <dd>
2434                 Constant (in the size of the <code>circular_buffer</code>).
2435               </dd>
2436             </dl>
2437             <dl>
2438               <dt>
2439                 <b>See Also:</b>
2440               </dt>
2441               <dd>
2442                 <code><a href="#classboost_1_1circular__buffer_1b233a298f5845a0fcf2ecc56f4170810">at() const</a></code>
2443               </dd>
2444             </dl>
2445           </td>
2446         </tr>
2447         <tr>
2448           <td>
2449             <a id="classboost_1_1circular__buffer_1cd84838cb4fffb6c113fd0297e502edc" name=
2450             "classboost_1_1circular__buffer_1cd84838cb4fffb6c113fd0297e502edc"></a><code><b><a href=
2451             "#classboost_1_1circular__buffer_1f38a9bc64d84757c661c2542ff9a7f65">reference</a> at(<a href=
2452             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> index);</b></code><br>
2453             <br>
2454             Get the element at the <code>index</code> position.
2455             <dl>
2456               <dt>
2457                 <b>Parameter(s):</b>
2458               </dt>
2459               <dd>
2460                 <dl compact>
2461                   <dt>
2462                     <code>index</code>
2463                   </dt>
2464                   <dd>
2465                     The position of the element.
2466                   </dd>
2467                 </dl>
2468               </dd>
2469             </dl>
2470             <dl>
2471               <dt>
2472                 <b>Returns:</b>
2473               </dt>
2474               <dd>
2475                 A reference to the element at the <code>index</code> position.
2476               </dd>
2477             </dl>
2478             <dl>
2479               <dt>
2480                 <b>Throws:</b>
2481               </dt>
2482               <dd>
2483                 <code>std::out_of_range</code> when the <code>index</code> is invalid (when <code>index &gt;= <a href=
2484                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>).
2485               </dd>
2486             </dl>
2487             <dl>
2488               <dt>
2489                 <b>Exception Safety:</b>
2490               </dt>
2491               <dd>
2492                 Strong.
2493               </dd>
2494             </dl>
2495             <dl>
2496               <dt>
2497                 <b>Iterator Invalidation:</b>
2498               </dt>
2499               <dd>
2500                 Does not invalidate any iterators.
2501               </dd>
2502             </dl>
2503             <dl>
2504               <dt>
2505                 <b>Complexity:</b>
2506               </dt>
2507               <dd>
2508                 Constant (in the size of the <code>circular_buffer</code>).
2509               </dd>
2510             </dl>
2511             <dl>
2512               <dt>
2513                 <b>See Also:</b>
2514               </dt>
2515               <dd>
2516                 <code><a href="#classboost_1_1circular__buffer_1d219f0d3203fb43b964a8cf63f1865cd">operator[]</a></code>
2517               </dd>
2518             </dl>
2519           </td>
2520         </tr>
2521         <tr>
2522           <td>
2523             <a id="classboost_1_1circular__buffer_1b233a298f5845a0fcf2ecc56f4170810" name=
2524             "classboost_1_1circular__buffer_1b233a298f5845a0fcf2ecc56f4170810"></a><code><b><a href=
2525             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> at(<a href=
2526             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> index)
2527             const;</b></code><br>
2528             <br>
2529             Get the element at the <code>index</code> position.
2530             <dl>
2531               <dt>
2532                 <b>Parameter(s):</b>
2533               </dt>
2534               <dd>
2535                 <dl compact>
2536                   <dt>
2537                     <code>index</code>
2538                   </dt>
2539                   <dd>
2540                     The position of the element.
2541                   </dd>
2542                 </dl>
2543               </dd>
2544             </dl>
2545             <dl>
2546               <dt>
2547                 <b>Returns:</b>
2548               </dt>
2549               <dd>
2550                 A const reference to the element at the <code>index</code> position.
2551               </dd>
2552             </dl>
2553             <dl>
2554               <dt>
2555                 <b>Throws:</b>
2556               </dt>
2557               <dd>
2558                 <code>std::out_of_range</code> when the <code>index</code> is invalid (when <code>index &gt;= <a href=
2559                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>).
2560               </dd>
2561             </dl>
2562             <dl>
2563               <dt>
2564                 <b>Exception Safety:</b>
2565               </dt>
2566               <dd>
2567                 Strong.
2568               </dd>
2569             </dl>
2570             <dl>
2571               <dt>
2572                 <b>Iterator Invalidation:</b>
2573               </dt>
2574               <dd>
2575                 Does not invalidate any iterators.
2576               </dd>
2577             </dl>
2578             <dl>
2579               <dt>
2580                 <b>Complexity:</b>
2581               </dt>
2582               <dd>
2583                 Constant (in the size of the <code>circular_buffer</code>).
2584               </dd>
2585             </dl>
2586             <dl>
2587               <dt>
2588                 <b>See Also:</b>
2589               </dt>
2590               <dd>
2591                 <code><a href="#classboost_1_1circular__buffer_1eb0a7fe7f8a56a4dc4c933b93adfcef4">operator[]
2592                 const</a></code>
2593               </dd>
2594             </dl>
2595           </td>
2596         </tr>
2597         <tr>
2598           <td>
2599             <a id="classboost_1_1circular__buffer_10d5fdeabeb352f47d1f7bb1ea8d9819f" name=
2600             "classboost_1_1circular__buffer_10d5fdeabeb352f47d1f7bb1ea8d9819f"></a><code><b><a href=
2601             "#classboost_1_1circular__buffer_1f38a9bc64d84757c661c2542ff9a7f65">reference</a> front();</b></code><br>
2602             <br>
2603             Get the first element.
2604             <dl>
2605               <dt>
2606                 <b>Precondition:</b>
2607               </dt>
2608               <dd>
2609                 <code>!empty()</code>
2610               </dd>
2611             </dl>
2612             <dl>
2613               <dt>
2614                 <b>Returns:</b>
2615               </dt>
2616               <dd>
2617                 A reference to the first element of the <code>circular_buffer</code>.
2618               </dd>
2619             </dl>
2620             <dl>
2621               <dt>
2622                 <b>Throws:</b>
2623               </dt>
2624               <dd>
2625                 Nothing.
2626               </dd>
2627             </dl>
2628             <dl>
2629               <dt>
2630                 <b>Exception Safety:</b>
2631               </dt>
2632               <dd>
2633                 No-throw.
2634               </dd>
2635             </dl>
2636             <dl>
2637               <dt>
2638                 <b>Iterator Invalidation:</b>
2639               </dt>
2640               <dd>
2641                 Does not invalidate any iterators.
2642               </dd>
2643             </dl>
2644             <dl>
2645               <dt>
2646                 <b>Complexity:</b>
2647               </dt>
2648               <dd>
2649                 Constant (in the size of the <code>circular_buffer</code>).
2650               </dd>
2651             </dl>
2652             <dl>
2653               <dt>
2654                 <b>See Also:</b>
2655               </dt>
2656               <dd>
2657                 <code><a href="#classboost_1_1circular__buffer_1d985d974020f88bb4255d8edbae0a30a">back()</a></code>
2658               </dd>
2659             </dl>
2660           </td>
2661         </tr>
2662         <tr>
2663           <td>
2664             <a id="classboost_1_1circular__buffer_1d985d974020f88bb4255d8edbae0a30a" name=
2665             "classboost_1_1circular__buffer_1d985d974020f88bb4255d8edbae0a30a"></a><code><b><a href=
2666             "#classboost_1_1circular__buffer_1f38a9bc64d84757c661c2542ff9a7f65">reference</a> back();</b></code><br>
2667             <br>
2668             Get the last element.
2669             <dl>
2670               <dt>
2671                 <b>Precondition:</b>
2672               </dt>
2673               <dd>
2674                 <code>!empty()</code>
2675               </dd>
2676             </dl>
2677             <dl>
2678               <dt>
2679                 <b>Returns:</b>
2680               </dt>
2681               <dd>
2682                 A reference to the last element of the <code>circular_buffer</code>.
2683               </dd>
2684             </dl>
2685             <dl>
2686               <dt>
2687                 <b>Throws:</b>
2688               </dt>
2689               <dd>
2690                 Nothing.
2691               </dd>
2692             </dl>
2693             <dl>
2694               <dt>
2695                 <b>Exception Safety:</b>
2696               </dt>
2697               <dd>
2698                 No-throw.
2699               </dd>
2700             </dl>
2701             <dl>
2702               <dt>
2703                 <b>Iterator Invalidation:</b>
2704               </dt>
2705               <dd>
2706                 Does not invalidate any iterators.
2707               </dd>
2708             </dl>
2709             <dl>
2710               <dt>
2711                 <b>Complexity:</b>
2712               </dt>
2713               <dd>
2714                 Constant (in the size of the <code>circular_buffer</code>).
2715               </dd>
2716             </dl>
2717             <dl>
2718               <dt>
2719                 <b>See Also:</b>
2720               </dt>
2721               <dd>
2722                 <code><a href="#classboost_1_1circular__buffer_10d5fdeabeb352f47d1f7bb1ea8d9819f">front()</a></code>
2723               </dd>
2724             </dl>
2725           </td>
2726         </tr>
2727         <tr>
2728           <td>
2729             <a id="classboost_1_1circular__buffer_10df8595d83bb9d8a7ce50aabc678f90b" name=
2730             "classboost_1_1circular__buffer_10df8595d83bb9d8a7ce50aabc678f90b"></a><code><b><a href=
2731             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> front()
2732             const;</b></code><br>
2733             <br>
2734             Get the first element.
2735             <dl>
2736               <dt>
2737                 <b>Precondition:</b>
2738               </dt>
2739               <dd>
2740                 <code>!empty()</code>
2741               </dd>
2742             </dl>
2743             <dl>
2744               <dt>
2745                 <b>Returns:</b>
2746               </dt>
2747               <dd>
2748                 A const reference to the first element of the <code>circular_buffer</code>.
2749               </dd>
2750             </dl>
2751             <dl>
2752               <dt>
2753                 <b>Throws:</b>
2754               </dt>
2755               <dd>
2756                 Nothing.
2757               </dd>
2758             </dl>
2759             <dl>
2760               <dt>
2761                 <b>Exception Safety:</b>
2762               </dt>
2763               <dd>
2764                 No-throw.
2765               </dd>
2766             </dl>
2767             <dl>
2768               <dt>
2769                 <b>Iterator Invalidation:</b>
2770               </dt>
2771               <dd>
2772                 Does not invalidate any iterators.
2773               </dd>
2774             </dl>
2775             <dl>
2776               <dt>
2777                 <b>Complexity:</b>
2778               </dt>
2779               <dd>
2780                 Constant (in the size of the <code>circular_buffer</code>).
2781               </dd>
2782             </dl>
2783             <dl>
2784               <dt>
2785                 <b>See Also:</b>
2786               </dt>
2787               <dd>
2788                 <code><a href="#classboost_1_1circular__buffer_1027201797868c6274feb6712f670a132">back()
2789                 const</a></code>
2790               </dd>
2791             </dl>
2792           </td>
2793         </tr>
2794         <tr>
2795           <td>
2796             <a id="classboost_1_1circular__buffer_1027201797868c6274feb6712f670a132" name=
2797             "classboost_1_1circular__buffer_1027201797868c6274feb6712f670a132"></a><code><b><a href=
2798             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> back()
2799             const;</b></code><br>
2800             <br>
2801             Get the last element.
2802             <dl>
2803               <dt>
2804                 <b>Precondition:</b>
2805               </dt>
2806               <dd>
2807                 <code>!empty()</code>
2808               </dd>
2809             </dl>
2810             <dl>
2811               <dt>
2812                 <b>Returns:</b>
2813               </dt>
2814               <dd>
2815                 A const reference to the last element of the <code>circular_buffer</code>.
2816               </dd>
2817             </dl>
2818             <dl>
2819               <dt>
2820                 <b>Throws:</b>
2821               </dt>
2822               <dd>
2823                 Nothing.
2824               </dd>
2825             </dl>
2826             <dl>
2827               <dt>
2828                 <b>Exception Safety:</b>
2829               </dt>
2830               <dd>
2831                 No-throw.
2832               </dd>
2833             </dl>
2834             <dl>
2835               <dt>
2836                 <b>Iterator Invalidation:</b>
2837               </dt>
2838               <dd>
2839                 Does not invalidate any iterators.
2840               </dd>
2841             </dl>
2842             <dl>
2843               <dt>
2844                 <b>Complexity:</b>
2845               </dt>
2846               <dd>
2847                 Constant (in the size of the <code>circular_buffer</code>).
2848               </dd>
2849             </dl>
2850             <dl>
2851               <dt>
2852                 <b>See Also:</b>
2853               </dt>
2854               <dd>
2855                 <code><a href="#classboost_1_1circular__buffer_10df8595d83bb9d8a7ce50aabc678f90b">front()
2856                 const</a></code>
2857               </dd>
2858             </dl>
2859           </td>
2860         </tr>
2861         <tr>
2862           <td>
2863             <a id="classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d" name=
2864             "classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d"></a><code><b><a href=
2865             "#classboost_1_1circular__buffer_126d279f91fef717e25459a0817ff242f">array_range</a>
2866             array_one();</b></code><br>
2867             <br>
2868             Get the first continuous array of the internal buffer.
2869             <p>
2870               This method in combination with <code><a href=
2871               "#classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b">array_two()</a></code> can be useful
2872               when passing the stored data into a legacy C API as an array. Suppose there is a
2873               <code>circular_buffer</code> of capacity 10, containing 7 characters <code>'a', 'b', ..., 'g'</code>
2874               where <code>buff[0] == 'a'</code>, <code>buff[1] == 'b'</code>, ... and <code>buff[6] == 'g'</code>:<br>
2875               <br>
2876               <code>circular_buffer&lt;char&gt; buff(10);</code><br>
2877               <br>
2878               The internal representation is often not linear and the state of the internal buffer may look like
2879               this:<br>
2880               <br>
2881               <code>|e|f|g| | | |a|b|c|d|<br>
2882               end ---^<br>
2883               begin -------^</code><br>
2884               <br>
2885               where <code>|a|b|c|d|</code> represents the "array one", <code>|e|f|g|</code> represents the "array two"
2886               and <code>| | | |</code> is a free space.<br>
2887               Now consider a typical C style function for writing data into a file:<br>
2888               <br>
2889               <code>int write(int file_desc, char* buff, int num_bytes);</code><br>
2890               <br>
2891               There are two ways how to write the content of the <code>circular_buffer</code> into a file. Either
2892               relying on <code><a href=
2893               "#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one()</a></code> and
2894               <code><a href="#classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b">array_two()</a></code>
2895               methods and calling the write function twice:<br>
2896               <br>
2897               <code>array_range ar = buff.array_one();<br>
2898               write(file_desc, ar.first, ar.second);<br>
2899               ar = buff.array_two();<br>
2900               write(file_desc, ar.first, ar.second);</code><br>
2901               <br>
2902               Or relying on the <code><a href=
2903               "#classboost_1_1circular__buffer_1ea728bf57f91aa8946eddf76ce816a4e">linearize()</a></code> method:<br>
2904               <br>
2905               <code>write(file_desc, buff.linearize(), buff.size());</code><br>
2906               <br>
2907               Since the complexity of <code><a href=
2908               "#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one()</a></code> and
2909               <code><a href="#classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b">array_two()</a></code>
2910               methods is constant the first option is suitable when calling the write method is "cheap". On the other
2911               hand the second option is more suitable when calling the write method is more "expensive" than calling
2912               the <code><a href=
2913               "#classboost_1_1circular__buffer_1ea728bf57f91aa8946eddf76ce816a4e">linearize()</a></code> method whose
2914               complexity is linear.
2915             </p>
2916             <dl>
2917               <dt>
2918                 <b>Returns:</b>
2919               </dt>
2920               <dd>
2921                 The array range of the first continuous array of the internal buffer. In the case the
2922                 <code>circular_buffer</code> is empty the size of the returned array is <code>0</code>.
2923               </dd>
2924             </dl>
2925             <dl>
2926               <dt>
2927                 <b>Throws:</b>
2928               </dt>
2929               <dd>
2930                 Nothing.
2931               </dd>
2932             </dl>
2933             <dl>
2934               <dt>
2935                 <b>Exception Safety:</b>
2936               </dt>
2937               <dd>
2938                 No-throw.
2939               </dd>
2940             </dl>
2941             <dl>
2942               <dt>
2943                 <b>Iterator Invalidation:</b>
2944               </dt>
2945               <dd>
2946                 Does not invalidate any iterators.
2947               </dd>
2948             </dl>
2949             <dl>
2950               <dt>
2951                 <b>Complexity:</b>
2952               </dt>
2953               <dd>
2954                 Constant (in the size of the <code>circular_buffer</code>).
2955               </dd>
2956             </dl>
2957             <dl>
2958               <dt>
2959                 <b>Warning:</b>
2960               </dt>
2961               <dd>
2962                 In general invoking any method which modifies the internal state of the circular_buffer may delinearize
2963                 the internal buffer and invalidate the array ranges returned by <code><a href=
2964                 "#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one()</a></code> and
2965                 <code><a href=
2966                 "#classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b">array_two()</a></code> (and their
2967                 const versions).
2968               </dd>
2969             </dl>
2970             <dl>
2971               <dt>
2972                 <b>Note:</b>
2973               </dt>
2974               <dd>
2975                 In the case the internal buffer is linear e.g. <code>|a|b|c|d|e|f|g| | | |</code> the "array one" is
2976                 represented by <code>|a|b|c|d|e|f|g|</code> and the "array two" does not exist (the <code><a href=
2977                 "#classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b">array_two()</a></code> method
2978                 returns an array with the size <code>0</code>).
2979               </dd>
2980             </dl>
2981             <dl>
2982               <dt>
2983                 <b>See Also:</b>
2984               </dt>
2985               <dd>
2986                 <code><a href=
2987                 "#classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b">array_two()</a></code>,
2988                 <code><a href=
2989                 "#classboost_1_1circular__buffer_1ea728bf57f91aa8946eddf76ce816a4e">linearize()</a></code>
2990               </dd>
2991             </dl>
2992           </td>
2993         </tr>
2994         <tr>
2995           <td>
2996             <a id="classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b" name=
2997             "classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b"></a><code><b><a href=
2998             "#classboost_1_1circular__buffer_126d279f91fef717e25459a0817ff242f">array_range</a>
2999             array_two();</b></code><br>
3000             <br>
3001             Get the second continuous array of the internal buffer.
3002             <p>
3003               This method in combination with <code><a href=
3004               "#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one()</a></code> can be useful
3005               when passing the stored data into a legacy C API as an array.
3006             </p>
3007             <dl>
3008               <dt>
3009                 <b>Returns:</b>
3010               </dt>
3011               <dd>
3012                 The array range of the second continuous array of the internal buffer. In the case the internal buffer
3013                 is linear or the <code>circular_buffer</code> is empty the size of the returned array is
3014                 <code>0</code>.
3015               </dd>
3016             </dl>
3017             <dl>
3018               <dt>
3019                 <b>Throws:</b>
3020               </dt>
3021               <dd>
3022                 Nothing.
3023               </dd>
3024             </dl>
3025             <dl>
3026               <dt>
3027                 <b>Exception Safety:</b>
3028               </dt>
3029               <dd>
3030                 No-throw.
3031               </dd>
3032             </dl>
3033             <dl>
3034               <dt>
3035                 <b>Iterator Invalidation:</b>
3036               </dt>
3037               <dd>
3038                 Does not invalidate any iterators.
3039               </dd>
3040             </dl>
3041             <dl>
3042               <dt>
3043                 <b>Complexity:</b>
3044               </dt>
3045               <dd>
3046                 Constant (in the size of the <code>circular_buffer</code>).
3047               </dd>
3048             </dl>
3049             <dl>
3050               <dt>
3051                 <b>See Also:</b>
3052               </dt>
3053               <dd>
3054                 <code><a href=
3055                 "#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one()</a></code>
3056               </dd>
3057             </dl>
3058           </td>
3059         </tr>
3060         <tr>
3061           <td>
3062             <a id="classboost_1_1circular__buffer_10f4b157e27b1170a571417986b239945" name=
3063             "classboost_1_1circular__buffer_10f4b157e27b1170a571417986b239945"></a><code><b><a href=
3064             "#classboost_1_1circular__buffer_11885d7f475b7e7a74c95b2448d243025">const_array_range</a> array_one()
3065             const;</b></code><br>
3066             <br>
3067             Get the first continuous array of the internal buffer.
3068             <p>
3069               This method in combination with <code><a href=
3070               "#classboost_1_1circular__buffer_1bb8eb0f298ad2012c55c5303e1f174d5">array_two() const</a></code> can be
3071               useful when passing the stored data into a legacy C API as an array.
3072             </p>
3073             <dl>
3074               <dt>
3075                 <b>Returns:</b>
3076               </dt>
3077               <dd>
3078                 The array range of the first continuous array of the internal buffer. In the case the
3079                 <code>circular_buffer</code> is empty the size of the returned array is <code>0</code>.
3080               </dd>
3081             </dl>
3082             <dl>
3083               <dt>
3084                 <b>Throws:</b>
3085               </dt>
3086               <dd>
3087                 Nothing.
3088               </dd>
3089             </dl>
3090             <dl>
3091               <dt>
3092                 <b>Exception Safety:</b>
3093               </dt>
3094               <dd>
3095                 No-throw.
3096               </dd>
3097             </dl>
3098             <dl>
3099               <dt>
3100                 <b>Iterator Invalidation:</b>
3101               </dt>
3102               <dd>
3103                 Does not invalidate any iterators.
3104               </dd>
3105             </dl>
3106             <dl>
3107               <dt>
3108                 <b>Complexity:</b>
3109               </dt>
3110               <dd>
3111                 Constant (in the size of the <code>circular_buffer</code>).
3112               </dd>
3113             </dl>
3114             <dl>
3115               <dt>
3116                 <b>See Also:</b>
3117               </dt>
3118               <dd>
3119                 <code><a href="#classboost_1_1circular__buffer_1bb8eb0f298ad2012c55c5303e1f174d5">array_two()
3120                 const</a></code>; <code><a href=
3121                 "#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one()</a></code> for more
3122                 details how to pass data into a legacy C API.
3123               </dd>
3124             </dl>
3125           </td>
3126         </tr>
3127         <tr>
3128           <td>
3129             <a id="classboost_1_1circular__buffer_1bb8eb0f298ad2012c55c5303e1f174d5" name=
3130             "classboost_1_1circular__buffer_1bb8eb0f298ad2012c55c5303e1f174d5"></a><code><b><a href=
3131             "#classboost_1_1circular__buffer_11885d7f475b7e7a74c95b2448d243025">const_array_range</a> array_two()
3132             const;</b></code><br>
3133             <br>
3134             Get the second continuous array of the internal buffer.
3135             <p>
3136               This method in combination with <code><a href=
3137               "#classboost_1_1circular__buffer_10f4b157e27b1170a571417986b239945">array_one() const</a></code> can be
3138               useful when passing the stored data into a legacy C API as an array.
3139             </p>
3140             <dl>
3141               <dt>
3142                 <b>Returns:</b>
3143               </dt>
3144               <dd>
3145                 The array range of the second continuous array of the internal buffer. In the case the internal buffer
3146                 is linear or the <code>circular_buffer</code> is empty the size of the returned array is
3147                 <code>0</code>.
3148               </dd>
3149             </dl>
3150             <dl>
3151               <dt>
3152                 <b>Throws:</b>
3153               </dt>
3154               <dd>
3155                 Nothing.
3156               </dd>
3157             </dl>
3158             <dl>
3159               <dt>
3160                 <b>Exception Safety:</b>
3161               </dt>
3162               <dd>
3163                 No-throw.
3164               </dd>
3165             </dl>
3166             <dl>
3167               <dt>
3168                 <b>Iterator Invalidation:</b>
3169               </dt>
3170               <dd>
3171                 Does not invalidate any iterators.
3172               </dd>
3173             </dl>
3174             <dl>
3175               <dt>
3176                 <b>Complexity:</b>
3177               </dt>
3178               <dd>
3179                 Constant (in the size of the <code>circular_buffer</code>).
3180               </dd>
3181             </dl>
3182             <dl>
3183               <dt>
3184                 <b>See Also:</b>
3185               </dt>
3186               <dd>
3187                 <code><a href="#classboost_1_1circular__buffer_10f4b157e27b1170a571417986b239945">array_one()
3188                 const</a></code>
3189               </dd>
3190             </dl>
3191           </td>
3192         </tr>
3193         <tr>
3194           <td>
3195             <a id="classboost_1_1circular__buffer_1ea728bf57f91aa8946eddf76ce816a4e" name=
3196             "classboost_1_1circular__buffer_1ea728bf57f91aa8946eddf76ce816a4e"></a><code><b><a href=
3197             "#classboost_1_1circular__buffer_14ff917f8a6131ec18e91606727592a9c">pointer</a> linearize();</b></code><br>
3198             <br>
3199             Linearize the internal buffer into a continuous array.
3200             <p>
3201               This method can be useful when passing the stored data into a legacy C API as an array.
3202             </p>
3203             <dl>
3204               <dt>
3205                 <b>Effect:</b>
3206               </dt>
3207               <dd>
3208                 <code>&amp;(*this)[0] &lt; &amp;(*this)[1] &lt; ... &lt; &amp;(*this)[<a href=
3209                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> - 1]</code>
3210               </dd>
3211             </dl>
3212             <dl>
3213               <dt>
3214                 <b>Returns:</b>
3215               </dt>
3216               <dd>
3217                 A pointer to the beginning of the array or <code>0</code> if empty.
3218               </dd>
3219             </dl>
3220             <dl>
3221               <dt>
3222                 <b>Throws:</b>
3223               </dt>
3224               <dd>
3225                 Whatever <code>T::T(const T&amp;)</code> throws.
3226               </dd>
3227               <dd>
3228                 Whatever <code>T::operator = (const T&amp;)</code> throws.
3229               </dd>
3230             </dl>
3231             <dl>
3232               <dt>
3233                 <b>Exception Safety:</b>
3234               </dt>
3235               <dd>
3236                 Basic; no-throw if the operations in the <i>Throws</i> section do not throw anything.
3237               </dd>
3238             </dl>
3239             <dl>
3240               <dt>
3241                 <b>Iterator Invalidation:</b>
3242               </dt>
3243               <dd>
3244                 Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to
3245                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>);
3246                 does not invalidate any iterators if the postcondition (the <i>Effect</i>) is already met prior calling
3247                 this method.
3248               </dd>
3249             </dl>
3250             <dl>
3251               <dt>
3252                 <b>Complexity:</b>
3253               </dt>
3254               <dd>
3255                 Linear (in the size of the <code>circular_buffer</code>); constant if the postcondition (the
3256                 <i>Effect</i>) is already met.
3257               </dd>
3258             </dl>
3259             <dl>
3260               <dt>
3261                 <b>Warning:</b>
3262               </dt>
3263               <dd>
3264                 In general invoking any method which modifies the internal state of the <code>circular_buffer</code>
3265                 may delinearize the internal buffer and invalidate the returned pointer.
3266               </dd>
3267             </dl>
3268             <dl>
3269               <dt>
3270                 <b>See Also:</b>
3271               </dt>
3272               <dd>
3273                 <code><a href=
3274                 "#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one()</a></code> and
3275                 <code><a href=
3276                 "#classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b">array_two()</a></code> for the
3277                 other option how to pass data into a legacy C API; <code><a href=
3278                 "#classboost_1_1circular__buffer_120f64448dc0723cc68c1096f6b00bc0a">is_linearized()</a></code>,
3279                 <code><a href=
3280                 "#classboost_1_1circular__buffer_1c591bb9e271b10b5240afcff3bd2c619">rotate(const_iterator)</a></code>
3281               </dd>
3282             </dl>
3283           </td>
3284         </tr>
3285         <tr>
3286           <td>
3287             <a id="classboost_1_1circular__buffer_120f64448dc0723cc68c1096f6b00bc0a" name=
3288             "classboost_1_1circular__buffer_120f64448dc0723cc68c1096f6b00bc0a"></a><code><b>bool is_linearized()
3289             const;</b></code><br>
3290             <br>
3291             Is the <code>circular_buffer</code> linearized?
3292             <dl>
3293               <dt>
3294                 <b>Returns:</b>
3295               </dt>
3296               <dd>
3297                 <code>true</code> if the internal buffer is linearized into a continuous array (i.e. the
3298                 <code>circular_buffer</code> meets a condition <code>&amp;(*this)[0] &lt; &amp;(*this)[1] &lt; ... &lt;
3299                 &amp;(*this)[<a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> -
3300                 1]</code>); <code>false</code> otherwise.
3301               </dd>
3302             </dl>
3303             <dl>
3304               <dt>
3305                 <b>Throws:</b>
3306               </dt>
3307               <dd>
3308                 Nothing.
3309               </dd>
3310             </dl>
3311             <dl>
3312               <dt>
3313                 <b>Exception Safety:</b>
3314               </dt>
3315               <dd>
3316                 No-throw.
3317               </dd>
3318             </dl>
3319             <dl>
3320               <dt>
3321                 <b>Iterator Invalidation:</b>
3322               </dt>
3323               <dd>
3324                 Does not invalidate any iterators.
3325               </dd>
3326             </dl>
3327             <dl>
3328               <dt>
3329                 <b>Complexity:</b>
3330               </dt>
3331               <dd>
3332                 Constant (in the size of the <code>circular_buffer</code>).
3333               </dd>
3334             </dl>
3335             <dl>
3336               <dt>
3337                 <b>See Also:</b>
3338               </dt>
3339               <dd>
3340                 <code><a href=
3341                 "#classboost_1_1circular__buffer_1ea728bf57f91aa8946eddf76ce816a4e">linearize()</a></code>,
3342                 <code><a href=
3343                 "#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one()</a></code>,
3344                 <code><a href=
3345                 "#classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b">array_two()</a></code>
3346               </dd>
3347             </dl>
3348           </td>
3349         </tr>
3350         <tr>
3351           <td>
3352             <a id="classboost_1_1circular__buffer_1c591bb9e271b10b5240afcff3bd2c619" name=
3353             "classboost_1_1circular__buffer_1c591bb9e271b10b5240afcff3bd2c619"></a><code><b>void rotate(<a href=
3354             "#classboost_1_1circular__buffer_15cab6d46f03c40d1e52d41843319ddb9">const_iterator</a>
3355             new_begin);</b></code><br>
3356             <br>
3357             Rotate elements in the <code>circular_buffer</code>.
3358             <p>
3359               A more effective implementation of <code><a href=
3360               "http://www.sgi.com/tech/stl/rotate.html">std::rotate</a></code>.
3361             </p>
3362             <dl>
3363               <dt>
3364                 <b>Precondition:</b>
3365               </dt>
3366               <dd>
3367                 <code>new_begin</code> is a valid iterator pointing to the <code>circular_buffer</code> <b>except</b>
3368                 its end.
3369               </dd>
3370             </dl>
3371             <dl>
3372               <dt>
3373                 <b>Effect:</b>
3374               </dt>
3375               <dd>
3376                 Before calling the method suppose:<br>
3377                 <br>
3378                 <code>m == std::distance(new_begin, <a href=
3379                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>)</code><br>
3380                 <code>n == std::distance(<a href=
3381                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, new_begin)</code><br>
3382                 <code>val_0 == *new_begin, val_1 == *(new_begin + 1), ... val_m == *(new_begin + m)</code><br>
3383                 <code>val_r1 == *(new_begin - 1), val_r2 == *(new_begin - 2), ... val_rn == *(new_begin - n)</code><br>
3384                 <br>
3385                 then after call to the method:<br>
3386                 <br>
3387                 <code>val_0 == (*this)[0] &amp;&amp; val_1 == (*this)[1] &amp;&amp; ... &amp;&amp; val_m == (*this)[m -
3388                 1] &amp;&amp; val_r1 == (*this)[m + n - 1] &amp;&amp; val_r2 == (*this)[m + n - 2] &amp;&amp; ...
3389                 &amp;&amp; val_rn == (*this)[m]</code>
3390               </dd>
3391             </dl>
3392             <dl>
3393               <dt>
3394                 <b>Parameter(s):</b>
3395               </dt>
3396               <dd>
3397                 <dl compact>
3398                   <dt>
3399                     <code>new_begin</code>
3400                   </dt>
3401                   <dd>
3402                     The new beginning.
3403                   </dd>
3404                 </dl>
3405               </dd>
3406             </dl>
3407             <dl>
3408               <dt>
3409                 <b>Throws:</b>
3410               </dt>
3411               <dd>
3412                 Whatever <code>T::T(const T&amp;)</code> throws.
3413               </dd>
3414               <dd>
3415                 Whatever <code>T::operator = (const T&amp;)</code> throws.
3416               </dd>
3417             </dl>
3418             <dl>
3419               <dt>
3420                 <b>Exception Safety:</b>
3421               </dt>
3422               <dd>
3423                 Basic; no-throw if the <code>circular_buffer</code> is full or <code>new_begin</code> points to
3424                 <code><a href="#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a></code> or
3425                 if the operations in the <i>Throws</i> section do not throw anything.
3426               </dd>
3427             </dl>
3428             <dl>
3429               <dt>
3430                 <b>Iterator Invalidation:</b>
3431               </dt>
3432               <dd>
3433                 If <code>m &lt; n</code> invalidates iterators pointing to the last <code>m</code> elements
3434                 (<b>including</b> <code>new_begin</code>, but not iterators equal to <code><a href=
3435                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>) else invalidates
3436                 iterators pointing to the first <code>n</code> elements; does not invalidate any iterators if the
3437                 <code>circular_buffer</code> is full.
3438               </dd>
3439             </dl>
3440             <dl>
3441               <dt>
3442                 <b>Complexity:</b>
3443               </dt>
3444               <dd>
3445                 Linear (in <code>(std::min)(m, n)</code>); constant if the <code>circular_buffer</code> is full.
3446               </dd>
3447             </dl>
3448             <dl>
3449               <dt>
3450                 <b>See Also:</b>
3451               </dt>
3452               <dd>
3453                 <code><a href="http://www.sgi.com/tech/stl/rotate.html">std::rotate</a></code>
3454               </dd>
3455             </dl>
3456           </td>
3457         </tr>
3458         <tr>
3459           <td>
3460             <a id="classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32" name=
3461             "classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32"></a><code><b><a href=
3462             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> size()
3463             const;</b></code><br>
3464             <br>
3465             Get the number of elements currently stored in the <code>circular_buffer</code>.
3466             <dl>
3467               <dt>
3468                 <b>Returns:</b>
3469               </dt>
3470               <dd>
3471                 The number of elements stored in the <code>circular_buffer</code>.
3472               </dd>
3473             </dl>
3474             <dl>
3475               <dt>
3476                 <b>Throws:</b>
3477               </dt>
3478               <dd>
3479                 Nothing.
3480               </dd>
3481             </dl>
3482             <dl>
3483               <dt>
3484                 <b>Exception Safety:</b>
3485               </dt>
3486               <dd>
3487                 No-throw.
3488               </dd>
3489             </dl>
3490             <dl>
3491               <dt>
3492                 <b>Iterator Invalidation:</b>
3493               </dt>
3494               <dd>
3495                 Does not invalidate any iterators.
3496               </dd>
3497             </dl>
3498             <dl>
3499               <dt>
3500                 <b>Complexity:</b>
3501               </dt>
3502               <dd>
3503                 Constant (in the size of the <code>circular_buffer</code>).
3504               </dd>
3505             </dl>
3506             <dl>
3507               <dt>
3508                 <b>See Also:</b>
3509               </dt>
3510               <dd>
3511                 <code><a href=
3512                 "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a></code>,
3513                 <code><a href=
3514                 "#classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7">max_size()</a></code>,
3515                 <code><a href="#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a></code>,
3516                 <code><a href="#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize(size_type,
3517                 const_reference)</a></code>
3518               </dd>
3519             </dl>
3520           </td>
3521         </tr>
3522         <tr>
3523           <td>
3524             <a id="classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7" name=
3525             "classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7"></a><code><b><a href=
3526             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> max_size()
3527             const;</b></code><br>
3528             <br>
3529             Get the largest possible size or capacity of the <code>circular_buffer</code>. (It depends on allocator's
3530             max_size()).
3531             <dl>
3532               <dt>
3533                 <b>Returns:</b>
3534               </dt>
3535               <dd>
3536                 The maximum size/capacity the <code>circular_buffer</code> can be set to.
3537               </dd>
3538             </dl>
3539             <dl>
3540               <dt>
3541                 <b>Throws:</b>
3542               </dt>
3543               <dd>
3544                 Nothing.
3545               </dd>
3546             </dl>
3547             <dl>
3548               <dt>
3549                 <b>Exception Safety:</b>
3550               </dt>
3551               <dd>
3552                 No-throw.
3553               </dd>
3554             </dl>
3555             <dl>
3556               <dt>
3557                 <b>Iterator Invalidation:</b>
3558               </dt>
3559               <dd>
3560                 Does not invalidate any iterators.
3561               </dd>
3562             </dl>
3563             <dl>
3564               <dt>
3565                 <b>Complexity:</b>
3566               </dt>
3567               <dd>
3568                 Constant (in the size of the <code>circular_buffer</code>).
3569               </dd>
3570             </dl>
3571             <dl>
3572               <dt>
3573                 <b>See Also:</b>
3574               </dt>
3575               <dd>
3576                 <code><a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>,
3577                 <code><a href=
3578                 "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a></code>,
3579                 <code><a href="#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a></code>
3580               </dd>
3581             </dl>
3582           </td>
3583         </tr>
3584         <tr>
3585           <td>
3586             <a id="classboost_1_1circular__buffer_15be1c2a005ec9828549ef6dd7ebed583" name=
3587             "classboost_1_1circular__buffer_15be1c2a005ec9828549ef6dd7ebed583"></a><code><b>bool empty()
3588             const;</b></code><br>
3589             <br>
3590             Is the <code>circular_buffer</code> empty?
3591             <dl>
3592               <dt>
3593                 <b>Returns:</b>
3594               </dt>
3595               <dd>
3596                 <code>true</code> if there are no elements stored in the <code>circular_buffer</code>;
3597                 <code>false</code> otherwise.
3598               </dd>
3599             </dl>
3600             <dl>
3601               <dt>
3602                 <b>Throws:</b>
3603               </dt>
3604               <dd>
3605                 Nothing.
3606               </dd>
3607             </dl>
3608             <dl>
3609               <dt>
3610                 <b>Exception Safety:</b>
3611               </dt>
3612               <dd>
3613                 No-throw.
3614               </dd>
3615             </dl>
3616             <dl>
3617               <dt>
3618                 <b>Iterator Invalidation:</b>
3619               </dt>
3620               <dd>
3621                 Does not invalidate any iterators.
3622               </dd>
3623             </dl>
3624             <dl>
3625               <dt>
3626                 <b>Complexity:</b>
3627               </dt>
3628               <dd>
3629                 Constant (in the size of the <code>circular_buffer</code>).
3630               </dd>
3631             </dl>
3632             <dl>
3633               <dt>
3634                 <b>See Also:</b>
3635               </dt>
3636               <dd>
3637                 <code><a href="#classboost_1_1circular__buffer_1fd0eef8ba91210d1575404b7e3e8207a">full()</a></code>
3638               </dd>
3639             </dl>
3640           </td>
3641         </tr>
3642         <tr>
3643           <td>
3644             <a id="classboost_1_1circular__buffer_1fd0eef8ba91210d1575404b7e3e8207a" name=
3645             "classboost_1_1circular__buffer_1fd0eef8ba91210d1575404b7e3e8207a"></a><code><b>bool full()
3646             const;</b></code><br>
3647             <br>
3648             Is the <code>circular_buffer</code> full?
3649             <dl>
3650               <dt>
3651                 <b>Returns:</b>
3652               </dt>
3653               <dd>
3654                 <code>true</code> if the number of elements stored in the <code>circular_buffer</code> equals the
3655                 capacity of the <code>circular_buffer</code>; <code>false</code> otherwise.
3656               </dd>
3657             </dl>
3658             <dl>
3659               <dt>
3660                 <b>Throws:</b>
3661               </dt>
3662               <dd>
3663                 Nothing.
3664               </dd>
3665             </dl>
3666             <dl>
3667               <dt>
3668                 <b>Exception Safety:</b>
3669               </dt>
3670               <dd>
3671                 No-throw.
3672               </dd>
3673             </dl>
3674             <dl>
3675               <dt>
3676                 <b>Iterator Invalidation:</b>
3677               </dt>
3678               <dd>
3679                 Does not invalidate any iterators.
3680               </dd>
3681             </dl>
3682             <dl>
3683               <dt>
3684                 <b>Complexity:</b>
3685               </dt>
3686               <dd>
3687                 Constant (in the size of the <code>circular_buffer</code>).
3688               </dd>
3689             </dl>
3690             <dl>
3691               <dt>
3692                 <b>See Also:</b>
3693               </dt>
3694               <dd>
3695                 <code><a href="#classboost_1_1circular__buffer_15be1c2a005ec9828549ef6dd7ebed583">empty()</a></code>
3696               </dd>
3697             </dl>
3698           </td>
3699         </tr>
3700         <tr>
3701           <td>
3702             <a id="classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de" name=
3703             "classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de"></a><code><b><a href=
3704             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> reserve()
3705             const;</b></code><br>
3706             <br>
3707             Get the maximum number of elements which can be inserted into the <code>circular_buffer</code> without
3708             overwriting any of already stored elements.
3709             <dl>
3710               <dt>
3711                 <b>Returns:</b>
3712               </dt>
3713               <dd>
3714                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> -
3715                 <a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>
3716               </dd>
3717             </dl>
3718             <dl>
3719               <dt>
3720                 <b>Throws:</b>
3721               </dt>
3722               <dd>
3723                 Nothing.
3724               </dd>
3725             </dl>
3726             <dl>
3727               <dt>
3728                 <b>Exception Safety:</b>
3729               </dt>
3730               <dd>
3731                 No-throw.
3732               </dd>
3733             </dl>
3734             <dl>
3735               <dt>
3736                 <b>Iterator Invalidation:</b>
3737               </dt>
3738               <dd>
3739                 Does not invalidate any iterators.
3740               </dd>
3741             </dl>
3742             <dl>
3743               <dt>
3744                 <b>Complexity:</b>
3745               </dt>
3746               <dd>
3747                 Constant (in the size of the <code>circular_buffer</code>).
3748               </dd>
3749             </dl>
3750             <dl>
3751               <dt>
3752                 <b>See Also:</b>
3753               </dt>
3754               <dd>
3755                 <code><a href=
3756                 "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a></code>,
3757                 <code><a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>,
3758                 <code><a href="#classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7">max_size()</a></code>
3759               </dd>
3760             </dl>
3761           </td>
3762         </tr>
3763         <tr>
3764           <td>
3765             <a id="classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77" name=
3766             "classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77"></a><code><b><a href=
3767             "#classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595">capacity_type</a> capacity()
3768             const;</b></code><br>
3769             <br>
3770             Get the capacity of the <code>circular_buffer</code>.
3771             <dl>
3772               <dt>
3773                 <b>Returns:</b>
3774               </dt>
3775               <dd>
3776                 The maximum number of elements which can be stored in the <code>circular_buffer</code>.
3777               </dd>
3778             </dl>
3779             <dl>
3780               <dt>
3781                 <b>Throws:</b>
3782               </dt>
3783               <dd>
3784                 Nothing.
3785               </dd>
3786             </dl>
3787             <dl>
3788               <dt>
3789                 <b>Exception Safety:</b>
3790               </dt>
3791               <dd>
3792                 No-throw.
3793               </dd>
3794             </dl>
3795             <dl>
3796               <dt>
3797                 <b>Iterator Invalidation:</b>
3798               </dt>
3799               <dd>
3800                 Does not invalidate any iterators.
3801               </dd>
3802             </dl>
3803             <dl>
3804               <dt>
3805                 <b>Complexity:</b>
3806               </dt>
3807               <dd>
3808                 Constant (in the size of the <code>circular_buffer</code>).
3809               </dd>
3810             </dl>
3811             <dl>
3812               <dt>
3813                 <b>See Also:</b>
3814               </dt>
3815               <dd>
3816                 <code><a href="#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a></code>,
3817                 <code><a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>,
3818                 <code><a href=
3819                 "#classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7">max_size()</a></code>,
3820                 <code><a href=
3821                 "#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity(capacity_type)</a></code>
3822               </dd>
3823             </dl>
3824           </td>
3825         </tr>
3826         <tr>
3827           <td>
3828             <a id="classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f" name=
3829             "classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f"></a><code><b>void set_capacity(<a href=
3830             "#classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595">capacity_type</a>
3831             new_capacity);</b></code><br>
3832             <br>
3833             Change the capacity of the <code>circular_buffer</code>.
3834             <dl>
3835               <dt>
3836                 <b>Effect:</b>
3837               </dt>
3838               <dd>
3839                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> ==
3840                 new_capacity &amp;&amp; <a href=
3841                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> &lt;=
3842                 new_capacity</code><br>
3843                 <br>
3844                 If the current number of elements stored in the <code>circular_buffer</code> is greater than the
3845                 desired new capacity then number of <code>[<a href=
3846                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> - new_capacity]</code>
3847                 <b>last</b> elements will be removed and the new size will be equal to <code>new_capacity</code>.
3848               </dd>
3849             </dl>
3850             <dl>
3851               <dt>
3852                 <b>Parameter(s):</b>
3853               </dt>
3854               <dd>
3855                 <dl compact>
3856                   <dt>
3857                     <code>new_capacity</code>
3858                   </dt>
3859                   <dd>
3860                     The new capacity.
3861                   </dd>
3862                 </dl>
3863               </dd>
3864             </dl>
3865             <dl>
3866               <dt>
3867                 <b>Throws:</b>
3868               </dt>
3869               <dd>
3870                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
3871                 used).
3872               </dd>
3873               <dd>
3874                 Whatever <code>T::T(const T&amp;)</code> throws.
3875               </dd>
3876             </dl>
3877             <dl>
3878               <dt>
3879                 <b>Exception Safety:</b>
3880               </dt>
3881               <dd>
3882                 Strong.
3883               </dd>
3884             </dl>
3885             <dl>
3886               <dt>
3887                 <b>Iterator Invalidation:</b>
3888               </dt>
3889               <dd>
3890                 Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to
3891                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>) if
3892                 the new capacity is different from the original.
3893               </dd>
3894             </dl>
3895             <dl>
3896               <dt>
3897                 <b>Complexity:</b>
3898               </dt>
3899               <dd>
3900                 Linear (in <code>min[<a href=
3901                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a>, new_capacity]</code>).
3902               </dd>
3903             </dl>
3904             <dl>
3905               <dt>
3906                 <b>See Also:</b>
3907               </dt>
3908               <dd>
3909                 <code><a href=
3910                 "#classboost_1_1circular__buffer_1477715e9d31d2cc5b02ad8ecf3c68c46">rset_capacity(capacity_type)</a></code>,
3911                 <code><a href="#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize(size_type,
3912                 const_reference)</a></code>
3913               </dd>
3914             </dl>
3915           </td>
3916         </tr>
3917         <tr>
3918           <td>
3919             <a id="classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3" name=
3920             "classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3"></a><code><b>void resize(<a href=
3921             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> new_size, <a href=
3922             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> item =
3923             value_type());</b></code><br>
3924             <br>
3925             Change the size of the <code>circular_buffer</code>.
3926             <dl>
3927               <dt>
3928                 <b>Effect:</b>
3929               </dt>
3930               <dd>
3931                 <code><a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> ==
3932                 new_size &amp;&amp; <a href=
3933                 "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> &gt;=
3934                 new_size</code><br>
3935                 <br>
3936                 If the new size is greater than the current size, copies of <code>item</code> will be inserted at the
3937                 <b>back</b> of the of the <code>circular_buffer</code> in order to achieve the desired size. In the
3938                 case the resulting size exceeds the current capacity the capacity will be set to
3939                 <code>new_size</code>.<br>
3940                 If the current number of elements stored in the <code>circular_buffer</code> is greater than the
3941                 desired new size then number of <code>[<a href=
3942                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> - new_size]</code>
3943                 <b>last</b> elements will be removed. (The capacity will remain unchanged.)
3944               </dd>
3945             </dl>
3946             <dl>
3947               <dt>
3948                 <b>Parameter(s):</b>
3949               </dt>
3950               <dd>
3951                 <dl compact>
3952                   <dt>
3953                     <code>new_size</code>
3954                   </dt>
3955                   <dd>
3956                     The new size.
3957                   </dd>
3958                 </dl>
3959               </dd>
3960               <dd>
3961                 <dl compact>
3962                   <dt>
3963                     <code>item</code>
3964                   </dt>
3965                   <dd>
3966                     The element the <code>circular_buffer</code> will be filled with in order to gain the requested
3967                     size. (See the <i>Effect</i>.)
3968                   </dd>
3969                 </dl>
3970               </dd>
3971             </dl>
3972             <dl>
3973               <dt>
3974                 <b>Throws:</b>
3975               </dt>
3976               <dd>
3977                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
3978                 used).
3979               </dd>
3980               <dd>
3981                 Whatever <code>T::T(const T&amp;)</code> throws.
3982               </dd>
3983             </dl>
3984             <dl>
3985               <dt>
3986                 <b>Exception Safety:</b>
3987               </dt>
3988               <dd>
3989                 Basic.
3990               </dd>
3991             </dl>
3992             <dl>
3993               <dt>
3994                 <b>Iterator Invalidation:</b>
3995               </dt>
3996               <dd>
3997                 Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to
3998                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>) if
3999                 the new size is greater than the current capacity. Invalidates iterators pointing to the removed
4000                 elements if the new size is lower that the original size. Otherwise it does not invalidate any
4001                 iterator.
4002               </dd>
4003             </dl>
4004             <dl>
4005               <dt>
4006                 <b>Complexity:</b>
4007               </dt>
4008               <dd>
4009                 Linear (in the new size of the <code>circular_buffer</code>).
4010               </dd>
4011             </dl>
4012             <dl>
4013               <dt>
4014                 <b>See Also:</b>
4015               </dt>
4016               <dd>
4017                 <code><a href="#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize(size_type,
4018                 const_reference)</a></code>, <code><a href=
4019                 "#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity(capacity_type)</a></code>
4020               </dd>
4021             </dl>
4022           </td>
4023         </tr>
4024         <tr>
4025           <td>
4026             <a id="classboost_1_1circular__buffer_1477715e9d31d2cc5b02ad8ecf3c68c46" name=
4027             "classboost_1_1circular__buffer_1477715e9d31d2cc5b02ad8ecf3c68c46"></a><code><b>void rset_capacity(<a href=
4028             "#classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595">capacity_type</a>
4029             new_capacity);</b></code><br>
4030             <br>
4031             Change the capacity of the <code>circular_buffer</code>.
4032             <dl>
4033               <dt>
4034                 <b>Effect:</b>
4035               </dt>
4036               <dd>
4037                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> ==
4038                 new_capacity &amp;&amp; <a href=
4039                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> &lt;=
4040                 new_capacity</code><br>
4041                 <br>
4042                 If the current number of elements stored in the <code>circular_buffer</code> is greater than the
4043                 desired new capacity then number of <code>[<a href=
4044                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> - new_capacity]</code>
4045                 <b>first</b> elements will be removed and the new size will be equal to <code>new_capacity</code>.
4046               </dd>
4047             </dl>
4048             <dl>
4049               <dt>
4050                 <b>Parameter(s):</b>
4051               </dt>
4052               <dd>
4053                 <dl compact>
4054                   <dt>
4055                     <code>new_capacity</code>
4056                   </dt>
4057                   <dd>
4058                     The new capacity.
4059                   </dd>
4060                 </dl>
4061               </dd>
4062             </dl>
4063             <dl>
4064               <dt>
4065                 <b>Throws:</b>
4066               </dt>
4067               <dd>
4068                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
4069                 used).
4070               </dd>
4071               <dd>
4072                 Whatever <code>T::T(const T&amp;)</code> throws.
4073               </dd>
4074             </dl>
4075             <dl>
4076               <dt>
4077                 <b>Exception Safety:</b>
4078               </dt>
4079               <dd>
4080                 Strong.
4081               </dd>
4082             </dl>
4083             <dl>
4084               <dt>
4085                 <b>Iterator Invalidation:</b>
4086               </dt>
4087               <dd>
4088                 Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to
4089                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>) if
4090                 the new capacity is different from the original.
4091               </dd>
4092             </dl>
4093             <dl>
4094               <dt>
4095                 <b>Complexity:</b>
4096               </dt>
4097               <dd>
4098                 Linear (in <code>min[<a href=
4099                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a>, new_capacity]</code>).
4100               </dd>
4101             </dl>
4102             <dl>
4103               <dt>
4104                 <b>See Also:</b>
4105               </dt>
4106               <dd>
4107                 <code><a href=
4108                 "#classboost_1_1circular__buffer_161714204ef5172d156e2c7eccd04998f">set_capacity(capacity_type)</a></code>,
4109                 <code><a href="#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize(size_type,
4110                 const_reference)</a></code>
4111               </dd>
4112             </dl>
4113           </td>
4114         </tr>
4115         <tr>
4116           <td>
4117             <a id="classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483" name=
4118             "classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483"></a><code><b>void rresize(<a href=
4119             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> new_size, <a href=
4120             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> item =
4121             value_type());</b></code><br>
4122             <br>
4123             Change the size of the <code>circular_buffer</code>.
4124             <dl>
4125               <dt>
4126                 <b>Effect:</b>
4127               </dt>
4128               <dd>
4129                 <code><a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> ==
4130                 new_size &amp;&amp; <a href=
4131                 "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> &gt;=
4132                 new_size</code><br>
4133                 <br>
4134                 If the new size is greater than the current size, copies of <code>item</code> will be inserted at the
4135                 <b>front</b> of the of the <code>circular_buffer</code> in order to achieve the desired size. In the
4136                 case the resulting size exceeds the current capacity the capacity will be set to
4137                 <code>new_size</code>.<br>
4138                 If the current number of elements stored in the <code>circular_buffer</code> is greater than the
4139                 desired new size then number of <code>[<a href=
4140                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> - new_size]</code>
4141                 <b>first</b> elements will be removed. (The capacity will remain unchanged.)
4142               </dd>
4143             </dl>
4144             <dl>
4145               <dt>
4146                 <b>Parameter(s):</b>
4147               </dt>
4148               <dd>
4149                 <dl compact>
4150                   <dt>
4151                     <code>new_size</code>
4152                   </dt>
4153                   <dd>
4154                     The new size.
4155                   </dd>
4156                 </dl>
4157               </dd>
4158               <dd>
4159                 <dl compact>
4160                   <dt>
4161                     <code>item</code>
4162                   </dt>
4163                   <dd>
4164                     The element the <code>circular_buffer</code> will be filled with in order to gain the requested
4165                     size. (See the <i>Effect</i>.)
4166                   </dd>
4167                 </dl>
4168               </dd>
4169             </dl>
4170             <dl>
4171               <dt>
4172                 <b>Throws:</b>
4173               </dt>
4174               <dd>
4175                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
4176                 used).
4177               </dd>
4178               <dd>
4179                 Whatever <code>T::T(const T&amp;)</code> throws.
4180               </dd>
4181             </dl>
4182             <dl>
4183               <dt>
4184                 <b>Exception Safety:</b>
4185               </dt>
4186               <dd>
4187                 Basic.
4188               </dd>
4189             </dl>
4190             <dl>
4191               <dt>
4192                 <b>Iterator Invalidation:</b>
4193               </dt>
4194               <dd>
4195                 Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to
4196                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>) if
4197                 the new size is greater than the current capacity. Invalidates iterators pointing to the removed
4198                 elements if the new size is lower that the original size. Otherwise it does not invalidate any
4199                 iterator.
4200               </dd>
4201             </dl>
4202             <dl>
4203               <dt>
4204                 <b>Complexity:</b>
4205               </dt>
4206               <dd>
4207                 Linear (in the new size of the <code>circular_buffer</code>).
4208               </dd>
4209             </dl>
4210             <dl>
4211               <dt>
4212                 <b>See Also:</b>
4213               </dt>
4214               <dd>
4215                 <code><a href="#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize(size_type,
4216                 const_reference)</a></code>, <code><a href=
4217                 "#classboost_1_1circular__buffer_1477715e9d31d2cc5b02ad8ecf3c68c46">rset_capacity(capacity_type)</a></code>
4218               </dd>
4219             </dl>
4220           </td>
4221         </tr>
4222         <tr>
4223           <td>
4224             <a id="classboost_1_1circular__buffer_1db1558911b2e251a587aeb3d8b3d797d" name=
4225             "classboost_1_1circular__buffer_1db1558911b2e251a587aeb3d8b3d797d"></a><code><b>circular_buffer&lt;T,Alloc&gt;&amp;
4226             operator=(const circular_buffer&lt;T,Alloc&gt;&amp; cb);</b></code><br>
4227             <br>
4228             The assign operator.
4229             <p>
4230               Makes this <code>circular_buffer</code> to become a copy of the specified <code>circular_buffer</code>.
4231             </p>
4232             <dl>
4233               <dt>
4234                 <b>Effect:</b>
4235               </dt>
4236               <dd>
4237                 <code>*this == cb</code>
4238               </dd>
4239             </dl>
4240             <dl>
4241               <dt>
4242                 <b>Parameter(s):</b>
4243               </dt>
4244               <dd>
4245                 <dl compact>
4246                   <dt>
4247                     <code>cb</code>
4248                   </dt>
4249                   <dd>
4250                     The <code>circular_buffer</code> to be copied.
4251                   </dd>
4252                 </dl>
4253               </dd>
4254             </dl>
4255             <dl>
4256               <dt>
4257                 <b>Throws:</b>
4258               </dt>
4259               <dd>
4260                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
4261                 used).
4262               </dd>
4263               <dd>
4264                 Whatever <code>T::T(const T&amp;)</code> throws.
4265               </dd>
4266             </dl>
4267             <dl>
4268               <dt>
4269                 <b>Exception Safety:</b>
4270               </dt>
4271               <dd>
4272                 Strong.
4273               </dd>
4274             </dl>
4275             <dl>
4276               <dt>
4277                 <b>Iterator Invalidation:</b>
4278               </dt>
4279               <dd>
4280                 Invalidates all iterators pointing to this <code>circular_buffer</code> (except iterators equal to
4281                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>).
4282               </dd>
4283             </dl>
4284             <dl>
4285               <dt>
4286                 <b>Complexity:</b>
4287               </dt>
4288               <dd>
4289                 Linear (in the size of <code>cb</code>).
4290               </dd>
4291             </dl>
4292             <dl>
4293               <dt>
4294                 <b>See Also:</b>
4295               </dt>
4296               <dd>
4297                 <code><a href="#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign(size_type,
4298                 const_reference)</a></code>, <code><a href=
4299                 "#classboost_1_1circular__buffer_1dbebb80a5f38e52a37ec9f3ed765600a">assign(capacity_type, size_type,
4300                 const_reference)</a></code>, <code><a href=
4301                 "#classboost_1_1circular__buffer_1253302d9bda5d7efbc4a6c311de3790c">assign(InputIterator,
4302                 InputIterator)</a></code>, <code><a href=
4303                 "#classboost_1_1circular__buffer_127cab6034beeeb0e11863c8c14d14366">assign(capacity_type,
4304                 InputIterator, InputIterator)</a></code>
4305               </dd>
4306             </dl>
4307           </td>
4308         </tr>
4309         <tr>
4310           <td>
4311             <a id="classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada" name=
4312             "classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada"></a><code><b>void assign(<a href=
4313             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> n, <a href=
4314             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a>
4315             item);</b></code><br>
4316             <br>
4317             Assign <code>n</code> items into the <code>circular_buffer</code>.
4318             <p>
4319               The content of the <code>circular_buffer</code> will be removed and replaced with <code>n</code> copies
4320               of the <code>item</code>.
4321             </p>
4322             <dl>
4323               <dt>
4324                 <b>Effect:</b>
4325               </dt>
4326               <dd>
4327                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> == n
4328                 &amp;&amp; <a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == n
4329                 &amp;&amp; (*this)[0] == item &amp;&amp; (*this)[1] == item &amp;&amp; ... &amp;&amp; (*this) [n - 1]
4330                 == item</code>
4331               </dd>
4332             </dl>
4333             <dl>
4334               <dt>
4335                 <b>Parameter(s):</b>
4336               </dt>
4337               <dd>
4338                 <dl compact>
4339                   <dt>
4340                     <code>n</code>
4341                   </dt>
4342                   <dd>
4343                     The number of elements the <code>circular_buffer</code> will be filled with.
4344                   </dd>
4345                 </dl>
4346               </dd>
4347               <dd>
4348                 <dl compact>
4349                   <dt>
4350                     <code>item</code>
4351                   </dt>
4352                   <dd>
4353                     The element the <code>circular_buffer</code> will be filled with.
4354                   </dd>
4355                 </dl>
4356               </dd>
4357             </dl>
4358             <dl>
4359               <dt>
4360                 <b>Throws:</b>
4361               </dt>
4362               <dd>
4363                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
4364                 used).
4365               </dd>
4366               <dd>
4367                 Whatever <code>T::T(const T&amp;)</code> throws.
4368               </dd>
4369             </dl>
4370             <dl>
4371               <dt>
4372                 <b>Exception Safety:</b>
4373               </dt>
4374               <dd>
4375                 Basic.
4376               </dd>
4377             </dl>
4378             <dl>
4379               <dt>
4380                 <b>Iterator Invalidation:</b>
4381               </dt>
4382               <dd>
4383                 Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to
4384                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>).
4385               </dd>
4386             </dl>
4387             <dl>
4388               <dt>
4389                 <b>Complexity:</b>
4390               </dt>
4391               <dd>
4392                 Linear (in the <code>n</code>).
4393               </dd>
4394             </dl>
4395             <dl>
4396               <dt>
4397                 <b>See Also:</b>
4398               </dt>
4399               <dd>
4400                 <code><a href="#classboost_1_1circular__buffer_1db1558911b2e251a587aeb3d8b3d797d">operator=</a></code>,
4401                 <code><a href="#classboost_1_1circular__buffer_1dbebb80a5f38e52a37ec9f3ed765600a">assign(capacity_type,
4402                 size_type, const_reference)</a></code>, <code><a href=
4403                 "#classboost_1_1circular__buffer_1253302d9bda5d7efbc4a6c311de3790c">assign(InputIterator,
4404                 InputIterator)</a></code>, <code><a href=
4405                 "#classboost_1_1circular__buffer_127cab6034beeeb0e11863c8c14d14366">assign(capacity_type,
4406                 InputIterator, InputIterator)</a></code>
4407               </dd>
4408             </dl>
4409           </td>
4410         </tr>
4411         <tr>
4412           <td>
4413             <a id="classboost_1_1circular__buffer_1dbebb80a5f38e52a37ec9f3ed765600a" name=
4414             "classboost_1_1circular__buffer_1dbebb80a5f38e52a37ec9f3ed765600a"></a><code><b>void assign(<a href=
4415             "#classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595">capacity_type</a> buffer_capacity,
4416             <a href="#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> n, <a href=
4417             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a>
4418             item);</b></code><br>
4419             <br>
4420             Assign <code>n</code> items into the <code>circular_buffer</code> specifying the capacity.
4421             <p>
4422               The capacity of the <code>circular_buffer</code> will be set to the specified value and the content of
4423               the <code>circular_buffer</code> will be removed and replaced with <code>n</code> copies of the
4424               <code>item</code>.
4425             </p>
4426             <dl>
4427               <dt>
4428                 <b>Precondition:</b>
4429               </dt>
4430               <dd>
4431                 <code>capacity &gt;= n</code>
4432               </dd>
4433             </dl>
4434             <dl>
4435               <dt>
4436                 <b>Effect:</b>
4437               </dt>
4438               <dd>
4439                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> ==
4440                 buffer_capacity &amp;&amp; <a href=
4441                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == n &amp;&amp;
4442                 (*this)[0] == item &amp;&amp; (*this)[1] == item &amp;&amp; ... &amp;&amp; (*this) [n - 1] ==
4443                 item</code>
4444               </dd>
4445             </dl>
4446             <dl>
4447               <dt>
4448                 <b>Parameter(s):</b>
4449               </dt>
4450               <dd>
4451                 <dl compact>
4452                   <dt>
4453                     <code>buffer_capacity</code>
4454                   </dt>
4455                   <dd>
4456                     The new capacity.
4457                   </dd>
4458                 </dl>
4459               </dd>
4460               <dd>
4461                 <dl compact>
4462                   <dt>
4463                     <code>n</code>
4464                   </dt>
4465                   <dd>
4466                     The number of elements the <code>circular_buffer</code> will be filled with.
4467                   </dd>
4468                 </dl>
4469               </dd>
4470               <dd>
4471                 <dl compact>
4472                   <dt>
4473                     <code>item</code>
4474                   </dt>
4475                   <dd>
4476                     The element the <code>circular_buffer</code> will be filled with.
4477                   </dd>
4478                 </dl>
4479               </dd>
4480             </dl>
4481             <dl>
4482               <dt>
4483                 <b>Throws:</b>
4484               </dt>
4485               <dd>
4486                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
4487                 used).
4488               </dd>
4489               <dd>
4490                 Whatever <code>T::T(const T&amp;)</code> throws.
4491               </dd>
4492             </dl>
4493             <dl>
4494               <dt>
4495                 <b>Exception Safety:</b>
4496               </dt>
4497               <dd>
4498                 Basic.
4499               </dd>
4500             </dl>
4501             <dl>
4502               <dt>
4503                 <b>Iterator Invalidation:</b>
4504               </dt>
4505               <dd>
4506                 Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to
4507                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>).
4508               </dd>
4509             </dl>
4510             <dl>
4511               <dt>
4512                 <b>Complexity:</b>
4513               </dt>
4514               <dd>
4515                 Linear (in the <code>n</code>).
4516               </dd>
4517             </dl>
4518             <dl>
4519               <dt>
4520                 <b>See Also:</b>
4521               </dt>
4522               <dd>
4523                 <code><a href="#classboost_1_1circular__buffer_1db1558911b2e251a587aeb3d8b3d797d">operator=</a></code>,
4524                 <code><a href="#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign(size_type,
4525                 const_reference)</a></code>, <code><a href=
4526                 "#classboost_1_1circular__buffer_1253302d9bda5d7efbc4a6c311de3790c">assign(InputIterator,
4527                 InputIterator)</a></code>, <code><a href=
4528                 "#classboost_1_1circular__buffer_127cab6034beeeb0e11863c8c14d14366">assign(capacity_type,
4529                 InputIterator, InputIterator)</a></code>
4530               </dd>
4531             </dl>
4532           </td>
4533         </tr>
4534         <tr>
4535           <td>
4536             <a id="classboost_1_1circular__buffer_1253302d9bda5d7efbc4a6c311de3790c" name=
4537             "classboost_1_1circular__buffer_1253302d9bda5d7efbc4a6c311de3790c"></a> <code><b>template &lt;class
4538             InputIterator&gt;<br>
4539                 void assign(InputIterator first, InputIterator last);</b></code><br>
4540             <br>
4541             Assign a copy of the range into the <code>circular_buffer</code>.
4542             <p>
4543               The content of the <code>circular_buffer</code> will be removed and replaced with copies of elements from
4544               the specified range.
4545             </p>
4546             <dl>
4547               <dt>
4548                 <b>Precondition:</b>
4549               </dt>
4550               <dd>
4551                 Valid range <code>[first, last)</code>.<br>
4552                 <code>first</code> and <code>last</code> have to meet the requirements of <a href=
4553                 "http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>.
4554               </dd>
4555             </dl>
4556             <dl>
4557               <dt>
4558                 <b>Effect:</b>
4559               </dt>
4560               <dd>
4561                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> ==
4562                 std::distance(first, last) &amp;&amp; <a href=
4563                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == std::distance(first,
4564                 last) &amp;&amp; (*this)[0]== *first &amp;&amp; (*this)[1] == *(first + 1) &amp;&amp; ... &amp;&amp;
4565                 (*this)[std::distance(first, last) - 1] == *(last - 1)</code>
4566               </dd>
4567             </dl>
4568             <dl>
4569               <dt>
4570                 <b>Parameter(s):</b>
4571               </dt>
4572               <dd>
4573                 <dl compact>
4574                   <dt>
4575                     <code>first</code>
4576                   </dt>
4577                   <dd>
4578                     The beginning of the range to be copied.
4579                   </dd>
4580                 </dl>
4581               </dd>
4582               <dd>
4583                 <dl compact>
4584                   <dt>
4585                     <code>last</code>
4586                   </dt>
4587                   <dd>
4588                     The end of the range to be copied.
4589                   </dd>
4590                 </dl>
4591               </dd>
4592             </dl>
4593             <dl>
4594               <dt>
4595                 <b>Throws:</b>
4596               </dt>
4597               <dd>
4598                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
4599                 used).
4600               </dd>
4601               <dd>
4602                 Whatever <code>T::T(const T&amp;)</code> throws.
4603               </dd>
4604             </dl>
4605             <dl>
4606               <dt>
4607                 <b>Exception Safety:</b>
4608               </dt>
4609               <dd>
4610                 Basic.
4611               </dd>
4612             </dl>
4613             <dl>
4614               <dt>
4615                 <b>Iterator Invalidation:</b>
4616               </dt>
4617               <dd>
4618                 Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to
4619                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>).
4620               </dd>
4621             </dl>
4622             <dl>
4623               <dt>
4624                 <b>Complexity:</b>
4625               </dt>
4626               <dd>
4627                 Linear (in the <code>std::distance(first, last)</code>).
4628               </dd>
4629             </dl>
4630             <dl>
4631               <dt>
4632                 <b>See Also:</b>
4633               </dt>
4634               <dd>
4635                 <code><a href="#classboost_1_1circular__buffer_1db1558911b2e251a587aeb3d8b3d797d">operator=</a></code>,
4636                 <code><a href="#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign(size_type,
4637                 const_reference)</a></code>, <code><a href=
4638                 "#classboost_1_1circular__buffer_1dbebb80a5f38e52a37ec9f3ed765600a">assign(capacity_type, size_type,
4639                 const_reference)</a></code>, <code><a href=
4640                 "#classboost_1_1circular__buffer_127cab6034beeeb0e11863c8c14d14366">assign(capacity_type,
4641                 InputIterator, InputIterator)</a></code>
4642               </dd>
4643             </dl>
4644           </td>
4645         </tr>
4646         <tr>
4647           <td>
4648             <a id="classboost_1_1circular__buffer_127cab6034beeeb0e11863c8c14d14366" name=
4649             "classboost_1_1circular__buffer_127cab6034beeeb0e11863c8c14d14366"></a> <code><b>template &lt;class
4650             InputIterator&gt;<br>
4651                 void assign(<a href=
4652             "#classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595">capacity_type</a> buffer_capacity,
4653             InputIterator first, InputIterator last);</b></code><br>
4654             <br>
4655             Assign a copy of the range into the <code>circular_buffer</code> specifying the capacity.
4656             <p>
4657               The capacity of the <code>circular_buffer</code> will be set to the specified value and the content of
4658               the <code>circular_buffer</code> will be removed and replaced with copies of elements from the specified
4659               range.
4660             </p>
4661             <dl>
4662               <dt>
4663                 <b>Precondition:</b>
4664               </dt>
4665               <dd>
4666                 Valid range <code>[first, last)</code>.<br>
4667                 <code>first</code> and <code>last</code> have to meet the requirements of <a href=
4668                 "http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>.
4669               </dd>
4670             </dl>
4671             <dl>
4672               <dt>
4673                 <b>Effect:</b>
4674               </dt>
4675               <dd>
4676                 <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a> ==
4677                 buffer_capacity &amp;&amp; <a href=
4678                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> &lt;=
4679                 std::distance(first, last) &amp;&amp; (*this)[0]== *(last - buffer_capacity) &amp;&amp; (*this)[1] ==
4680                 *(last - buffer_capacity + 1) &amp;&amp; ... &amp;&amp; (*this)[buffer_capacity - 1] == *(last -
4681                 1)</code><br>
4682                 <br>
4683                 If the number of items to be copied from the range <code>[first, last)</code> is greater than the
4684                 specified <code>buffer_capacity</code> then only elements from the range <code>[last - buffer_capacity,
4685                 last)</code> will be copied.
4686               </dd>
4687             </dl>
4688             <dl>
4689               <dt>
4690                 <b>Parameter(s):</b>
4691               </dt>
4692               <dd>
4693                 <dl compact>
4694                   <dt>
4695                     <code>buffer_capacity</code>
4696                   </dt>
4697                   <dd>
4698                     The new capacity.
4699                   </dd>
4700                 </dl>
4701               </dd>
4702               <dd>
4703                 <dl compact>
4704                   <dt>
4705                     <code>first</code>
4706                   </dt>
4707                   <dd>
4708                     The beginning of the range to be copied.
4709                   </dd>
4710                 </dl>
4711               </dd>
4712               <dd>
4713                 <dl compact>
4714                   <dt>
4715                     <code>last</code>
4716                   </dt>
4717                   <dd>
4718                     The end of the range to be copied.
4719                   </dd>
4720                 </dl>
4721               </dd>
4722             </dl>
4723             <dl>
4724               <dt>
4725                 <b>Throws:</b>
4726               </dt>
4727               <dd>
4728                 An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is
4729                 used).
4730               </dd>
4731               <dd>
4732                 Whatever <code>T::T(const T&amp;)</code> throws.
4733               </dd>
4734             </dl>
4735             <dl>
4736               <dt>
4737                 <b>Exception Safety:</b>
4738               </dt>
4739               <dd>
4740                 Basic.
4741               </dd>
4742             </dl>
4743             <dl>
4744               <dt>
4745                 <b>Iterator Invalidation:</b>
4746               </dt>
4747               <dd>
4748                 Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to
4749                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>).
4750               </dd>
4751             </dl>
4752             <dl>
4753               <dt>
4754                 <b>Complexity:</b>
4755               </dt>
4756               <dd>
4757                 Linear (in <code>std::distance(first, last)</code>; in <code>min[capacity, std::distance(first,
4758                 last)]</code> if the <code>InputIterator</code> is a <a href=
4759                 "http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>).
4760               </dd>
4761             </dl>
4762             <dl>
4763               <dt>
4764                 <b>See Also:</b>
4765               </dt>
4766               <dd>
4767                 <code><a href="#classboost_1_1circular__buffer_1db1558911b2e251a587aeb3d8b3d797d">operator=</a></code>,
4768                 <code><a href="#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign(size_type,
4769                 const_reference)</a></code>, <code><a href=
4770                 "#classboost_1_1circular__buffer_1dbebb80a5f38e52a37ec9f3ed765600a">assign(capacity_type, size_type,
4771                 const_reference)</a></code>, <code><a href=
4772                 "#classboost_1_1circular__buffer_1253302d9bda5d7efbc4a6c311de3790c">assign(InputIterator,
4773                 InputIterator)</a></code>
4774               </dd>
4775             </dl>
4776           </td>
4777         </tr>
4778         <tr>
4779           <td>
4780             <a id="classboost_1_1circular__buffer_1270ab7074c365663a6f18808024fd88b" name=
4781             "classboost_1_1circular__buffer_1270ab7074c365663a6f18808024fd88b"></a><code><b>void
4782             swap(circular_buffer&lt;T,Alloc&gt;&amp; cb);</b></code><br>
4783             <br>
4784             Swap the contents of two <code>circular_buffer</code>s.
4785             <dl>
4786               <dt>
4787                 <b>Effect:</b>
4788               </dt>
4789               <dd>
4790                 <code>this</code> contains elements of <code>cb</code> and vice versa; the capacity of
4791                 <code>this</code> equals to the capacity of <code>cb</code> and vice versa.
4792               </dd>
4793             </dl>
4794             <dl>
4795               <dt>
4796                 <b>Parameter(s):</b>
4797               </dt>
4798               <dd>
4799                 <dl compact>
4800                   <dt>
4801                     <code>cb</code>
4802                   </dt>
4803                   <dd>
4804                     The <code>circular_buffer</code> whose content will be swapped.
4805                   </dd>
4806                 </dl>
4807               </dd>
4808             </dl>
4809             <dl>
4810               <dt>
4811                 <b>Throws:</b>
4812               </dt>
4813               <dd>
4814                 Nothing.
4815               </dd>
4816             </dl>
4817             <dl>
4818               <dt>
4819                 <b>Exception Safety:</b>
4820               </dt>
4821               <dd>
4822                 No-throw.
4823               </dd>
4824             </dl>
4825             <dl>
4826               <dt>
4827                 <b>Iterator Invalidation:</b>
4828               </dt>
4829               <dd>
4830                 Invalidates all iterators of both <code>circular_buffer</code>s. (On the other hand the iterators still
4831                 point to the same elements but within another container. If you want to rely on this feature you have
4832                 to turn the <a href="#debug">Debug Support</a> off otherwise an assertion will report an error if such
4833                 invalidated iterator is used.)
4834               </dd>
4835             </dl>
4836             <dl>
4837               <dt>
4838                 <b>Complexity:</b>
4839               </dt>
4840               <dd>
4841                 Constant (in the size of the <code>circular_buffer</code>).
4842               </dd>
4843             </dl>
4844             <dl>
4845               <dt>
4846                 <b>See Also:</b>
4847               </dt>
4848               <dd>
4849                 <code><a href="#namespaceboost_14aa8f6a2c9640f3f22e266f0fca85777">swap(circular_buffer&lt;T,
4850                 Alloc&gt;&amp;, circular_buffer&lt;T, Alloc&gt;&amp;)</a></code>
4851               </dd>
4852             </dl>
4853           </td>
4854         </tr>
4855         <tr>
4856           <td>
4857             <a id="classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e" name=
4858             "classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e"></a><code><b>void push_back(<a href=
4859             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> item =
4860             value_type());</b></code><br>
4861             <br>
4862             Insert a new element at the end of the <code>circular_buffer</code>.
4863             <dl>
4864               <dt>
4865                 <b>Effect:</b>
4866               </dt>
4867               <dd>
4868                 if <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a>
4869                 &gt; 0</code> then <code><a href=
4870                 "#classboost_1_1circular__buffer_1d985d974020f88bb4255d8edbae0a30a">back()</a> == item</code><br>
4871                 If the <code>circular_buffer</code> is full, the first element will be removed. If the capacity is
4872                 <code>0</code>, nothing will be inserted.
4873               </dd>
4874             </dl>
4875             <dl>
4876               <dt>
4877                 <b>Parameter(s):</b>
4878               </dt>
4879               <dd>
4880                 <dl compact>
4881                   <dt>
4882                     <code>item</code>
4883                   </dt>
4884                   <dd>
4885                     The element to be inserted.
4886                   </dd>
4887                 </dl>
4888               </dd>
4889             </dl>
4890             <dl>
4891               <dt>
4892                 <b>Throws:</b>
4893               </dt>
4894               <dd>
4895                 Whatever <code>T::T(const T&amp;)</code> throws.
4896               </dd>
4897               <dd>
4898                 Whatever <code>T::operator = (const T&amp;)</code> throws.
4899               </dd>
4900             </dl>
4901             <dl>
4902               <dt>
4903                 <b>Exception Safety:</b>
4904               </dt>
4905               <dd>
4906                 Basic; no-throw if the operation in the <i>Throws</i> section does not throw anything.
4907               </dd>
4908             </dl>
4909             <dl>
4910               <dt>
4911                 <b>Iterator Invalidation:</b>
4912               </dt>
4913               <dd>
4914                 Does not invalidate any iterators with the exception of iterators pointing to the overwritten element.
4915               </dd>
4916             </dl>
4917             <dl>
4918               <dt>
4919                 <b>Complexity:</b>
4920               </dt>
4921               <dd>
4922                 Constant (in the size of the <code>circular_buffer</code>).
4923               </dd>
4924             </dl>
4925             <dl>
4926               <dt>
4927                 <b>See Also:</b>
4928               </dt>
4929               <dd>
4930                 <code><a href=
4931                 "#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front(const_reference)</a></code>,
4932                 <code><a href=
4933                 "#classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07">pop_back()</a></code>,
4934                 <code><a href=
4935                 "#classboost_1_1circular__buffer_18ac972dc24ef7236faa1875de92b9dd8">pop_front()</a></code>
4936               </dd>
4937             </dl>
4938           </td>
4939         </tr>
4940         <tr>
4941           <td>
4942             <a id="classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce" name=
4943             "classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce"></a><code><b>void push_front(<a href=
4944             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> item =
4945             value_type());</b></code><br>
4946             <br>
4947             Insert a new element at the beginning of the <code>circular_buffer</code>.
4948             <dl>
4949               <dt>
4950                 <b>Effect:</b>
4951               </dt>
4952               <dd>
4953                 if <code><a href="#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a>
4954                 &gt; 0</code> then <code><a href=
4955                 "#classboost_1_1circular__buffer_10d5fdeabeb352f47d1f7bb1ea8d9819f">front()</a> == item</code><br>
4956                 If the <code>circular_buffer</code> is full, the last element will be removed. If the capacity is
4957                 <code>0</code>, nothing will be inserted.
4958               </dd>
4959             </dl>
4960             <dl>
4961               <dt>
4962                 <b>Parameter(s):</b>
4963               </dt>
4964               <dd>
4965                 <dl compact>
4966                   <dt>
4967                     <code>item</code>
4968                   </dt>
4969                   <dd>
4970                     The element to be inserted.
4971                   </dd>
4972                 </dl>
4973               </dd>
4974             </dl>
4975             <dl>
4976               <dt>
4977                 <b>Throws:</b>
4978               </dt>
4979               <dd>
4980                 Whatever <code>T::T(const T&amp;)</code> throws.
4981               </dd>
4982               <dd>
4983                 Whatever <code>T::operator = (const T&amp;)</code> throws.
4984               </dd>
4985             </dl>
4986             <dl>
4987               <dt>
4988                 <b>Exception Safety:</b>
4989               </dt>
4990               <dd>
4991                 Basic; no-throw if the operation in the <i>Throws</i> section does not throw anything.
4992               </dd>
4993             </dl>
4994             <dl>
4995               <dt>
4996                 <b>Iterator Invalidation:</b>
4997               </dt>
4998               <dd>
4999                 Does not invalidate any iterators with the exception of iterators pointing to the overwritten element.
5000               </dd>
5001             </dl>
5002             <dl>
5003               <dt>
5004                 <b>Complexity:</b>
5005               </dt>
5006               <dd>
5007                 Constant (in the size of the <code>circular_buffer</code>).
5008               </dd>
5009             </dl>
5010             <dl>
5011               <dt>
5012                 <b>See Also:</b>
5013               </dt>
5014               <dd>
5015                 <code><a href=
5016                 "#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back(const_reference)</a></code>,
5017                 <code><a href=
5018                 "#classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07">pop_back()</a></code>,
5019                 <code><a href=
5020                 "#classboost_1_1circular__buffer_18ac972dc24ef7236faa1875de92b9dd8">pop_front()</a></code>
5021               </dd>
5022             </dl>
5023           </td>
5024         </tr>
5025         <tr>
5026           <td>
5027             <a id="classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07" name=
5028             "classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07"></a><code><b>void
5029             pop_back();</b></code><br>
5030             <br>
5031             Remove the last element from the <code>circular_buffer</code>.
5032             <dl>
5033               <dt>
5034                 <b>Precondition:</b>
5035               </dt>
5036               <dd>
5037                 <code>!empty()</code>
5038               </dd>
5039             </dl>
5040             <dl>
5041               <dt>
5042                 <b>Effect:</b>
5043               </dt>
5044               <dd>
5045                 The last element is removed from the <code>circular_buffer</code>.
5046               </dd>
5047             </dl>
5048             <dl>
5049               <dt>
5050                 <b>Throws:</b>
5051               </dt>
5052               <dd>
5053                 Nothing.
5054               </dd>
5055             </dl>
5056             <dl>
5057               <dt>
5058                 <b>Exception Safety:</b>
5059               </dt>
5060               <dd>
5061                 No-throw.
5062               </dd>
5063             </dl>
5064             <dl>
5065               <dt>
5066                 <b>Iterator Invalidation:</b>
5067               </dt>
5068               <dd>
5069                 Invalidates only iterators pointing to the removed element.
5070               </dd>
5071             </dl>
5072             <dl>
5073               <dt>
5074                 <b>Complexity:</b>
5075               </dt>
5076               <dd>
5077                 Constant (in the size of the <code>circular_buffer</code>).
5078               </dd>
5079             </dl>
5080             <dl>
5081               <dt>
5082                 <b>See Also:</b>
5083               </dt>
5084               <dd>
5085                 <code><a href=
5086                 "#classboost_1_1circular__buffer_18ac972dc24ef7236faa1875de92b9dd8">pop_front()</a></code>,
5087                 <code><a href=
5088                 "#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back(const_reference)</a></code>,
5089                 <code><a href=
5090                 "#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front(const_reference)</a></code>
5091               </dd>
5092             </dl>
5093           </td>
5094         </tr>
5095         <tr>
5096           <td>
5097             <a id="classboost_1_1circular__buffer_18ac972dc24ef7236faa1875de92b9dd8" name=
5098             "classboost_1_1circular__buffer_18ac972dc24ef7236faa1875de92b9dd8"></a><code><b>void
5099             pop_front();</b></code><br>
5100             <br>
5101             Remove the first element from the <code>circular_buffer</code>.
5102             <dl>
5103               <dt>
5104                 <b>Precondition:</b>
5105               </dt>
5106               <dd>
5107                 <code>!empty()</code>
5108               </dd>
5109             </dl>
5110             <dl>
5111               <dt>
5112                 <b>Effect:</b>
5113               </dt>
5114               <dd>
5115                 The first element is removed from the <code>circular_buffer</code>.
5116               </dd>
5117             </dl>
5118             <dl>
5119               <dt>
5120                 <b>Throws:</b>
5121               </dt>
5122               <dd>
5123                 Nothing.
5124               </dd>
5125             </dl>
5126             <dl>
5127               <dt>
5128                 <b>Exception Safety:</b>
5129               </dt>
5130               <dd>
5131                 No-throw.
5132               </dd>
5133             </dl>
5134             <dl>
5135               <dt>
5136                 <b>Iterator Invalidation:</b>
5137               </dt>
5138               <dd>
5139                 Invalidates only iterators pointing to the removed element.
5140               </dd>
5141             </dl>
5142             <dl>
5143               <dt>
5144                 <b>Complexity:</b>
5145               </dt>
5146               <dd>
5147                 Constant (in the size of the <code>circular_buffer</code>).
5148               </dd>
5149             </dl>
5150             <dl>
5151               <dt>
5152                 <b>See Also:</b>
5153               </dt>
5154               <dd>
5155                 <code><a href=
5156                 "#classboost_1_1circular__buffer_1df0da00cb501bea75afbbfab9f546a07">pop_back()</a></code>,
5157                 <code><a href=
5158                 "#classboost_1_1circular__buffer_1aa35dd7ef8eb1d04508494d1835cc82e">push_back(const_reference)</a></code>,
5159                 <code><a href=
5160                 "#classboost_1_1circular__buffer_10ef57e73c193682a649d8eb4a1096dce">push_front(const_reference)</a></code>
5161               </dd>
5162             </dl>
5163           </td>
5164         </tr>
5165         <tr>
5166           <td>
5167             <a id="classboost_1_1circular__buffer_128c92740fee1b9deb8c69816e389de95" name=
5168             "classboost_1_1circular__buffer_128c92740fee1b9deb8c69816e389de95"></a><code><b><a href=
5169             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> insert(<a href=
5170             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> pos, <a href=
5171             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> item =
5172             value_type());</b></code><br>
5173             <br>
5174             Insert an element at the specified position.
5175             <dl>
5176               <dt>
5177                 <b>Precondition:</b>
5178               </dt>
5179               <dd>
5180                 <code>pos</code> is a valid iterator pointing to the <code>circular_buffer</code> or its end.
5181               </dd>
5182             </dl>
5183             <dl>
5184               <dt>
5185                 <b>Effect:</b>
5186               </dt>
5187               <dd>
5188                 The <code>item</code> will be inserted at the position <code>pos</code>.<br>
5189                 If the <code>circular_buffer</code> is full, the first element will be overwritten. If the
5190                 <code>circular_buffer</code> is full and the <code>pos</code> points to <code><a href=
5191                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a></code>, then the
5192                 <code>item</code> will not be inserted. If the capacity is <code>0</code>, nothing will be inserted.
5193               </dd>
5194             </dl>
5195             <dl>
5196               <dt>
5197                 <b>Parameter(s):</b>
5198               </dt>
5199               <dd>
5200                 <dl compact>
5201                   <dt>
5202                     <code>pos</code>
5203                   </dt>
5204                   <dd>
5205                     An iterator specifying the position where the <code>item</code> will be inserted.
5206                   </dd>
5207                 </dl>
5208               </dd>
5209               <dd>
5210                 <dl compact>
5211                   <dt>
5212                     <code>item</code>
5213                   </dt>
5214                   <dd>
5215                     The element to be inserted.
5216                   </dd>
5217                 </dl>
5218               </dd>
5219             </dl>
5220             <dl>
5221               <dt>
5222                 <b>Returns:</b>
5223               </dt>
5224               <dd>
5225                 Iterator to the inserted element or <code><a href=
5226                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a></code> if the
5227                 <code>item</code> is not inserted. (See the <i>Effect</i>.)
5228               </dd>
5229             </dl>
5230             <dl>
5231               <dt>
5232                 <b>Throws:</b>
5233               </dt>
5234               <dd>
5235                 Whatever <code>T::T(const T&amp;)</code> throws.
5236               </dd>
5237               <dd>
5238                 Whatever <code>T::operator = (const T&amp;)</code> throws.
5239               </dd>
5240             </dl>
5241             <dl>
5242               <dt>
5243                 <b>Exception Safety:</b>
5244               </dt>
5245               <dd>
5246                 Basic; no-throw if the operation in the <i>Throws</i> section does not throw anything.
5247               </dd>
5248             </dl>
5249             <dl>
5250               <dt>
5251                 <b>Iterator Invalidation:</b>
5252               </dt>
5253               <dd>
5254                 Invalidates iterators pointing to the elements at the insertion point (including <code>pos</code>) and
5255                 iterators behind the insertion point (towards the end; except iterators equal to <code><a href=
5256                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>). It also
5257                 invalidates iterators pointing to the overwritten element.
5258               </dd>
5259             </dl>
5260             <dl>
5261               <dt>
5262                 <b>Complexity:</b>
5263               </dt>
5264               <dd>
5265                 Linear (in <code>std::distance(pos, <a href=
5266                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>)</code>).
5267               </dd>
5268             </dl>
5269             <dl>
5270               <dt>
5271                 <b>See Also:</b>
5272               </dt>
5273               <dd>
5274                 <code><a href="#classboost_1_1circular__buffer_1b2f197c99d47138db777f0a46783b140">insert(iterator,
5275                 size_type, value_type)</a></code>, <code><a href=
5276                 "#classboost_1_1circular__buffer_1d00091d1d794cab3264b3674e99b33f6">insert(iterator, InputIterator,
5277                 InputIterator)</a></code>, <code><a href=
5278                 "#classboost_1_1circular__buffer_12c9332f457bf5bb3128463cf528c058c">rinsert(iterator,
5279                 value_type)</a></code>, <code><a href=
5280                 "#classboost_1_1circular__buffer_1a47a5358db1b7d7e4925c16db13d2fc5">rinsert(iterator, size_type,
5281                 value_type)</a></code>, <code><a href=
5282                 "#classboost_1_1circular__buffer_1d6479cbc43a304bdbf04262f957fa323">rinsert(iterator, InputIterator,
5283                 InputIterator)</a></code>
5284               </dd>
5285             </dl>
5286           </td>
5287         </tr>
5288         <tr>
5289           <td>
5290             <a id="classboost_1_1circular__buffer_1b2f197c99d47138db777f0a46783b140" name=
5291             "classboost_1_1circular__buffer_1b2f197c99d47138db777f0a46783b140"></a><code><b>void insert(<a href=
5292             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> pos, <a href=
5293             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> n, <a href=
5294             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a>
5295             item);</b></code><br>
5296             <br>
5297             Insert <code>n</code> copies of the <code>item</code> at the specified position.
5298             <dl>
5299               <dt>
5300                 <b>Precondition:</b>
5301               </dt>
5302               <dd>
5303                 <code>pos</code> is a valid iterator pointing to the <code>circular_buffer</code> or its end.
5304               </dd>
5305             </dl>
5306             <dl>
5307               <dt>
5308                 <b>Effect:</b>
5309               </dt>
5310               <dd>
5311                 The number of <code>min[n, (pos - <a href=
5312                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>) + <a href=
5313                 "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>]</code> elements will
5314                 be inserted at the position <code>pos</code>.<br>
5315                 The number of <code>min[pos - <a href=
5316                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, max[0, n - <a href=
5317                 "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>]]</code> elements
5318                 will be overwritten at the beginning of the <code>circular_buffer</code>.<br>
5319                 (See <i>Example</i> for the explanation.)
5320               </dd>
5321             </dl>
5322             <dl>
5323               <dt>
5324                 <b>Parameter(s):</b>
5325               </dt>
5326               <dd>
5327                 <dl compact>
5328                   <dt>
5329                     <code>pos</code>
5330                   </dt>
5331                   <dd>
5332                     An iterator specifying the position where the <code>item</code>s will be inserted.
5333                   </dd>
5334                 </dl>
5335               </dd>
5336               <dd>
5337                 <dl compact>
5338                   <dt>
5339                     <code>n</code>
5340                   </dt>
5341                   <dd>
5342                     The number of <code>item</code>s the to be inserted.
5343                   </dd>
5344                 </dl>
5345               </dd>
5346               <dd>
5347                 <dl compact>
5348                   <dt>
5349                     <code>item</code>
5350                   </dt>
5351                   <dd>
5352                     The element whose copies will be inserted.
5353                   </dd>
5354                 </dl>
5355               </dd>
5356             </dl>
5357             <dl>
5358               <dt>
5359                 <b>Throws:</b>
5360               </dt>
5361               <dd>
5362                 Whatever <code>T::T(const T&amp;)</code> throws.
5363               </dd>
5364               <dd>
5365                 Whatever <code>T::operator = (const T&amp;)</code> throws.
5366               </dd>
5367             </dl>
5368             <dl>
5369               <dt>
5370                 <b>Exception Safety:</b>
5371               </dt>
5372               <dd>
5373                 Basic; no-throw if the operations in the <i>Throws</i> section do not throw anything.
5374               </dd>
5375             </dl>
5376             <dl>
5377               <dt>
5378                 <b>Iterator Invalidation:</b>
5379               </dt>
5380               <dd>
5381                 Invalidates iterators pointing to the elements at the insertion point (including <code>pos</code>) and
5382                 iterators behind the insertion point (towards the end; except iterators equal to <code><a href=
5383                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>). It also
5384                 invalidates iterators pointing to the overwritten elements.
5385               </dd>
5386             </dl>
5387             <dl>
5388               <dt>
5389                 <b>Complexity:</b>
5390               </dt>
5391               <dd>
5392                 Linear (in <code>min[<a href=
5393                 "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a>, std::distance(pos,
5394                 <a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>) + n]</code>).
5395               </dd>
5396             </dl>
5397             <dl>
5398               <dt>
5399                 <b>Example:</b>
5400               </dt>
5401               <dd>
5402                 Consider a <code>circular_buffer</code> with the capacity of 6 and the size of 4. Its internal buffer
5403                 may look like the one below.<br>
5404                 <br>
5405                 <code>|1|2|3|4| | |</code><br>
5406                 <code>p ---^</code><br>
5407                 <br>
5408                 After inserting 5 elements at the position <code>p</code>:<br>
5409                 <br>
5410                 <code>insert(p, (size_t)5, 0);</code><br>
5411                 <br>
5412                 actually only 4 elements get inserted and elements <code>1</code> and <code>2</code> are overwritten.
5413                 This is due to the fact the insert operation preserves the capacity. After insertion the internal
5414                 buffer looks like this:<br>
5415                 <br>
5416                 <code>|0|0|0|0|3|4|</code><br>
5417                 <br>
5418                 For comparison if the capacity would not be preserved the internal buffer would then result in
5419                 <code>|1|2|0|0|0|0|0|3|4|</code>.
5420               </dd>
5421             </dl>
5422             <dl>
5423               <dt>
5424                 <b>See Also:</b>
5425               </dt>
5426               <dd>
5427                 <code><a href="#classboost_1_1circular__buffer_128c92740fee1b9deb8c69816e389de95">insert(iterator,
5428                 value_type)</a></code>, <code><a href=
5429                 "#classboost_1_1circular__buffer_1d00091d1d794cab3264b3674e99b33f6">insert(iterator, InputIterator,
5430                 InputIterator)</a></code>, <code><a href=
5431                 "#classboost_1_1circular__buffer_12c9332f457bf5bb3128463cf528c058c">rinsert(iterator,
5432                 value_type)</a></code>, <code><a href=
5433                 "#classboost_1_1circular__buffer_1a47a5358db1b7d7e4925c16db13d2fc5">rinsert(iterator, size_type,
5434                 value_type)</a></code>, <code><a href=
5435                 "#classboost_1_1circular__buffer_1d6479cbc43a304bdbf04262f957fa323">rinsert(iterator, InputIterator,
5436                 InputIterator)</a></code>
5437               </dd>
5438             </dl>
5439           </td>
5440         </tr>
5441         <tr>
5442           <td>
5443             <a id="classboost_1_1circular__buffer_1d00091d1d794cab3264b3674e99b33f6" name=
5444             "classboost_1_1circular__buffer_1d00091d1d794cab3264b3674e99b33f6"></a> <code><b>template &lt;class
5445             InputIterator&gt;<br>
5446                 void insert(<a href="#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a>
5447             pos, InputIterator first, InputIterator last);</b></code><br>
5448             <br>
5449             Insert the range <code>[first, last)</code> at the specified position.
5450             <dl>
5451               <dt>
5452                 <b>Precondition:</b>
5453               </dt>
5454               <dd>
5455                 <code>pos</code> is a valid iterator pointing to the <code>circular_buffer</code> or its end.<br>
5456                 Valid range <code>[first, last)</code> where <code>first</code> and <code>last</code> meet the
5457                 requirements of an <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>.
5458               </dd>
5459             </dl>
5460             <dl>
5461               <dt>
5462                 <b>Effect:</b>
5463               </dt>
5464               <dd>
5465                 Elements from the range <code>[first + max[0, distance(first, last) - (pos - <a href=
5466                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>) - <a href=
5467                 "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>], last)</code> will
5468                 be inserted at the position <code>pos</code>.<br>
5469                 The number of <code>min[pos - <a href=
5470                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, max[0, distance(first,
5471                 last) - <a href=
5472                 "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>]]</code> elements
5473                 will be overwritten at the beginning of the <code>circular_buffer</code>.<br>
5474                 (See <i>Example</i> for the explanation.)
5475               </dd>
5476             </dl>
5477             <dl>
5478               <dt>
5479                 <b>Parameter(s):</b>
5480               </dt>
5481               <dd>
5482                 <dl compact>
5483                   <dt>
5484                     <code>pos</code>
5485                   </dt>
5486                   <dd>
5487                     An iterator specifying the position where the range will be inserted.
5488                   </dd>
5489                 </dl>
5490               </dd>
5491               <dd>
5492                 <dl compact>
5493                   <dt>
5494                     <code>first</code>
5495                   </dt>
5496                   <dd>
5497                     The beginning of the range to be inserted.
5498                   </dd>
5499                 </dl>
5500               </dd>
5501               <dd>
5502                 <dl compact>
5503                   <dt>
5504                     <code>last</code>
5505                   </dt>
5506                   <dd>
5507                     The end of the range to be inserted.
5508                   </dd>
5509                 </dl>
5510               </dd>
5511             </dl>
5512             <dl>
5513               <dt>
5514                 <b>Throws:</b>
5515               </dt>
5516               <dd>
5517                 Whatever <code>T::T(const T&amp;)</code> throws.
5518               </dd>
5519               <dd>
5520                 Whatever <code>T::operator = (const T&amp;)</code> throws.
5521               </dd>
5522             </dl>
5523             <dl>
5524               <dt>
5525                 <b>Exception Safety:</b>
5526               </dt>
5527               <dd>
5528                 Basic; no-throw if the operations in the <i>Throws</i> section do not throw anything.
5529               </dd>
5530             </dl>
5531             <dl>
5532               <dt>
5533                 <b>Iterator Invalidation:</b>
5534               </dt>
5535               <dd>
5536                 Invalidates iterators pointing to the elements at the insertion point (including <code>pos</code>) and
5537                 iterators behind the insertion point (towards the end; except iterators equal to <code><a href=
5538                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>). It also
5539                 invalidates iterators pointing to the overwritten elements.
5540               </dd>
5541             </dl>
5542             <dl>
5543               <dt>
5544                 <b>Complexity:</b>
5545               </dt>
5546               <dd>
5547                 Linear (in <code>[std::distance(pos, <a href=
5548                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>) + std::distance(first,
5549                 last)]</code>; in <code>min[<a href=
5550                 "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a>, std::distance(pos,
5551                 <a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>) +
5552                 std::distance(first, last)]</code> if the <code>InputIterator</code> is a <a href=
5553                 "http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>).
5554               </dd>
5555             </dl>
5556             <dl>
5557               <dt>
5558                 <b>Example:</b>
5559               </dt>
5560               <dd>
5561                 Consider a <code>circular_buffer</code> with the capacity of 6 and the size of 4. Its internal buffer
5562                 may look like the one below.<br>
5563                 <br>
5564                 <code>|1|2|3|4| | |</code><br>
5565                 <code>p ---^</code><br>
5566                 <br>
5567                 After inserting a range of elements at the position <code>p</code>:<br>
5568                 <br>
5569                 <code>int array[] = { 5, 6, 7, 8, 9 };</code><br>
5570                 <code>insert(p, array, array + 5);</code><br>
5571                 <br>
5572                 actually only elements <code>6</code>, <code>7</code>, <code>8</code> and <code>9</code> from the
5573                 specified range get inserted and elements <code>1</code> and <code>2</code> are overwritten. This is
5574                 due to the fact the insert operation preserves the capacity. After insertion the internal buffer looks
5575                 like this:<br>
5576                 <br>
5577                 <code>|6|7|8|9|3|4|</code><br>
5578                 <br>
5579                 For comparison if the capacity would not be preserved the internal buffer would then result in
5580                 <code>|1|2|5|6|7|8|9|3|4|</code>.
5581               </dd>
5582             </dl>
5583             <dl>
5584               <dt>
5585                 <b>See Also:</b>
5586               </dt>
5587               <dd>
5588                 <code><a href="#classboost_1_1circular__buffer_128c92740fee1b9deb8c69816e389de95">insert(iterator,
5589                 value_type)</a></code>, <code><a href=
5590                 "#classboost_1_1circular__buffer_1b2f197c99d47138db777f0a46783b140">insert(iterator, size_type,
5591                 value_type)</a></code>, <code><a href=
5592                 "#classboost_1_1circular__buffer_12c9332f457bf5bb3128463cf528c058c">rinsert(iterator,
5593                 value_type)</a></code>, <code><a href=
5594                 "#classboost_1_1circular__buffer_1a47a5358db1b7d7e4925c16db13d2fc5">rinsert(iterator, size_type,
5595                 value_type)</a></code>, <code><a href=
5596                 "#classboost_1_1circular__buffer_1d6479cbc43a304bdbf04262f957fa323">rinsert(iterator, InputIterator,
5597                 InputIterator)</a></code>
5598               </dd>
5599             </dl>
5600           </td>
5601         </tr>
5602         <tr>
5603           <td>
5604             <a id="classboost_1_1circular__buffer_12c9332f457bf5bb3128463cf528c058c" name=
5605             "classboost_1_1circular__buffer_12c9332f457bf5bb3128463cf528c058c"></a><code><b><a href=
5606             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> rinsert(<a href=
5607             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> pos, <a href=
5608             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> item =
5609             value_type());</b></code><br>
5610             <br>
5611             Insert an element before the specified position.
5612             <dl>
5613               <dt>
5614                 <b>Precondition:</b>
5615               </dt>
5616               <dd>
5617                 <code>pos</code> is a valid iterator pointing to the <code>circular_buffer</code> or its end.
5618               </dd>
5619             </dl>
5620             <dl>
5621               <dt>
5622                 <b>Effect:</b>
5623               </dt>
5624               <dd>
5625                 The <code>item</code> will be inserted before the position <code>pos</code>.<br>
5626                 If the <code>circular_buffer</code> is full, the last element will be overwritten. If the
5627                 <code>circular_buffer</code> is full and the <code>pos</code> points to <code><a href=
5628                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>, then the
5629                 <code>item</code> will not be inserted. If the capacity is <code>0</code>, nothing will be inserted.
5630               </dd>
5631             </dl>
5632             <dl>
5633               <dt>
5634                 <b>Parameter(s):</b>
5635               </dt>
5636               <dd>
5637                 <dl compact>
5638                   <dt>
5639                     <code>pos</code>
5640                   </dt>
5641                   <dd>
5642                     An iterator specifying the position before which the <code>item</code> will be inserted.
5643                   </dd>
5644                 </dl>
5645               </dd>
5646               <dd>
5647                 <dl compact>
5648                   <dt>
5649                     <code>item</code>
5650                   </dt>
5651                   <dd>
5652                     The element to be inserted.
5653                   </dd>
5654                 </dl>
5655               </dd>
5656             </dl>
5657             <dl>
5658               <dt>
5659                 <b>Returns:</b>
5660               </dt>
5661               <dd>
5662                 Iterator to the inserted element or <code><a href=
5663                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code> if the
5664                 <code>item</code> is not inserted. (See the <i>Effect</i>.)
5665               </dd>
5666             </dl>
5667             <dl>
5668               <dt>
5669                 <b>Throws:</b>
5670               </dt>
5671               <dd>
5672                 Whatever <code>T::T(const T&amp;)</code> throws.
5673               </dd>
5674               <dd>
5675                 Whatever <code>T::operator = (const T&amp;)</code> throws.
5676               </dd>
5677             </dl>
5678             <dl>
5679               <dt>
5680                 <b>Exception Safety:</b>
5681               </dt>
5682               <dd>
5683                 Basic; no-throw if the operations in the <i>Throws</i> section do not throw anything.
5684               </dd>
5685             </dl>
5686             <dl>
5687               <dt>
5688                 <b>Iterator Invalidation:</b>
5689               </dt>
5690               <dd>
5691                 Invalidates iterators pointing to the elements before the insertion point (towards the beginning and
5692                 excluding <code>pos</code>). It also invalidates iterators pointing to the overwritten element.
5693               </dd>
5694             </dl>
5695             <dl>
5696               <dt>
5697                 <b>Complexity:</b>
5698               </dt>
5699               <dd>
5700                 Linear (in <code>std::distance(<a href=
5701                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, pos)</code>).
5702               </dd>
5703             </dl>
5704             <dl>
5705               <dt>
5706                 <b>See Also:</b>
5707               </dt>
5708               <dd>
5709                 <code><a href="#classboost_1_1circular__buffer_1a47a5358db1b7d7e4925c16db13d2fc5">rinsert(iterator,
5710                 size_type, value_type)</a></code>, <code><a href=
5711                 "#classboost_1_1circular__buffer_1d6479cbc43a304bdbf04262f957fa323">rinsert(iterator, InputIterator,
5712                 InputIterator)</a></code>, <code><a href=
5713                 "#classboost_1_1circular__buffer_128c92740fee1b9deb8c69816e389de95">insert(iterator,
5714                 value_type)</a></code>, <code><a href=
5715                 "#classboost_1_1circular__buffer_1b2f197c99d47138db777f0a46783b140">insert(iterator, size_type,
5716                 value_type)</a></code>, <code><a href=
5717                 "#classboost_1_1circular__buffer_1d00091d1d794cab3264b3674e99b33f6">insert(iterator, InputIterator,
5718                 InputIterator)</a></code>
5719               </dd>
5720             </dl>
5721           </td>
5722         </tr>
5723         <tr>
5724           <td>
5725             <a id="classboost_1_1circular__buffer_1a47a5358db1b7d7e4925c16db13d2fc5" name=
5726             "classboost_1_1circular__buffer_1a47a5358db1b7d7e4925c16db13d2fc5"></a><code><b>void rinsert(<a href=
5727             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> pos, <a href=
5728             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> n, <a href=
5729             "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a>
5730             item);</b></code><br>
5731             <br>
5732             Insert <code>n</code> copies of the <code>item</code> before the specified position.
5733             <dl>
5734               <dt>
5735                 <b>Precondition:</b>
5736               </dt>
5737               <dd>
5738                 <code>pos</code> is a valid iterator pointing to the <code>circular_buffer</code> or its end.
5739               </dd>
5740             </dl>
5741             <dl>
5742               <dt>
5743                 <b>Effect:</b>
5744               </dt>
5745               <dd>
5746                 The number of <code>min[n, (<a href=
5747                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> - pos) + <a href=
5748                 "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>]</code> elements will
5749                 be inserted before the position <code>pos</code>.<br>
5750                 The number of <code>min[<a href=
5751                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> - pos, max[0, n -
5752                 <a href="#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>]]</code>
5753                 elements will be overwritten at the end of the <code>circular_buffer</code>.<br>
5754                 (See <i>Example</i> for the explanation.)
5755               </dd>
5756             </dl>
5757             <dl>
5758               <dt>
5759                 <b>Parameter(s):</b>
5760               </dt>
5761               <dd>
5762                 <dl compact>
5763                   <dt>
5764                     <code>pos</code>
5765                   </dt>
5766                   <dd>
5767                     An iterator specifying the position where the <code>item</code>s will be inserted.
5768                   </dd>
5769                 </dl>
5770               </dd>
5771               <dd>
5772                 <dl compact>
5773                   <dt>
5774                     <code>n</code>
5775                   </dt>
5776                   <dd>
5777                     The number of <code>item</code>s the to be inserted.
5778                   </dd>
5779                 </dl>
5780               </dd>
5781               <dd>
5782                 <dl compact>
5783                   <dt>
5784                     <code>item</code>
5785                   </dt>
5786                   <dd>
5787                     The element whose copies will be inserted.
5788                   </dd>
5789                 </dl>
5790               </dd>
5791             </dl>
5792             <dl>
5793               <dt>
5794                 <b>Throws:</b>
5795               </dt>
5796               <dd>
5797                 Whatever <code>T::T(const T&amp;)</code> throws.
5798               </dd>
5799               <dd>
5800                 Whatever <code>T::operator = (const T&amp;)</code> throws.
5801               </dd>
5802             </dl>
5803             <dl>
5804               <dt>
5805                 <b>Exception Safety:</b>
5806               </dt>
5807               <dd>
5808                 Basic; no-throw if the operations in the <i>Throws</i> section do not throw anything.
5809               </dd>
5810             </dl>
5811             <dl>
5812               <dt>
5813                 <b>Iterator Invalidation:</b>
5814               </dt>
5815               <dd>
5816                 Invalidates iterators pointing to the elements before the insertion point (towards the beginning and
5817                 excluding <code>pos</code>). It also invalidates iterators pointing to the overwritten elements.
5818               </dd>
5819             </dl>
5820             <dl>
5821               <dt>
5822                 <b>Complexity:</b>
5823               </dt>
5824               <dd>
5825                 Linear (in <code>min[<a href=
5826                 "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a>,
5827                 std::distance(<a href="#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>,
5828                 pos) + n]</code>).
5829               </dd>
5830             </dl>
5831             <dl>
5832               <dt>
5833                 <b>Example:</b>
5834               </dt>
5835               <dd>
5836                 Consider a <code>circular_buffer</code> with the capacity of 6 and the size of 4. Its internal buffer
5837                 may look like the one below.<br>
5838                 <br>
5839                 <code>|1|2|3|4| | |</code><br>
5840                 <code>p ---^</code><br>
5841                 <br>
5842                 After inserting 5 elements before the position <code>p</code>:<br>
5843                 <br>
5844                 <code>rinsert(p, (size_t)5, 0);</code><br>
5845                 <br>
5846                 actually only 4 elements get inserted and elements <code>3</code> and <code>4</code> are overwritten.
5847                 This is due to the fact the rinsert operation preserves the capacity. After insertion the internal
5848                 buffer looks like this:<br>
5849                 <br>
5850                 <code>|1|2|0|0|0|0|</code><br>
5851                 <br>
5852                 For comparison if the capacity would not be preserved the internal buffer would then result in
5853                 <code>|1|2|0|0|0|0|0|3|4|</code>.
5854               </dd>
5855             </dl>
5856             <dl>
5857               <dt>
5858                 <b>See Also:</b>
5859               </dt>
5860               <dd>
5861                 <code><a href="#classboost_1_1circular__buffer_12c9332f457bf5bb3128463cf528c058c">rinsert(iterator,
5862                 value_type)</a></code>, <code><a href=
5863                 "#classboost_1_1circular__buffer_1d6479cbc43a304bdbf04262f957fa323">rinsert(iterator, InputIterator,
5864                 InputIterator)</a></code>, <code><a href=
5865                 "#classboost_1_1circular__buffer_128c92740fee1b9deb8c69816e389de95">insert(iterator,
5866                 value_type)</a></code>, <code><a href=
5867                 "#classboost_1_1circular__buffer_1b2f197c99d47138db777f0a46783b140">insert(iterator, size_type,
5868                 value_type)</a></code>, <code><a href=
5869                 "#classboost_1_1circular__buffer_1d00091d1d794cab3264b3674e99b33f6">insert(iterator, InputIterator,
5870                 InputIterator)</a></code>
5871               </dd>
5872             </dl>
5873           </td>
5874         </tr>
5875         <tr>
5876           <td>
5877             <a id="classboost_1_1circular__buffer_1d6479cbc43a304bdbf04262f957fa323" name=
5878             "classboost_1_1circular__buffer_1d6479cbc43a304bdbf04262f957fa323"></a> <code><b>template &lt;class
5879             InputIterator&gt;<br>
5880                 void rinsert(<a href="#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a>
5881             pos, InputIterator first, InputIterator last);</b></code><br>
5882             <br>
5883             Insert the range <code>[first, last)</code> before the specified position.
5884             <dl>
5885               <dt>
5886                 <b>Precondition:</b>
5887               </dt>
5888               <dd>
5889                 <code>pos</code> is a valid iterator pointing to the <code>circular_buffer</code> or its end.<br>
5890                 Valid range <code>[first, last)</code> where <code>first</code> and <code>last</code> meet the
5891                 requirements of an <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>.
5892               </dd>
5893             </dl>
5894             <dl>
5895               <dt>
5896                 <b>Effect:</b>
5897               </dt>
5898               <dd>
5899                 Elements from the range <code>[first, last - max[0, distance(first, last) - (<a href=
5900                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> - pos) - <a href=
5901                 "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>])</code> will be
5902                 inserted before the position <code>pos</code>.<br>
5903                 The number of <code>min[<a href=
5904                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a> - pos, max[0,
5905                 distance(first, last) - <a href=
5906                 "#classboost_1_1circular__buffer_10a02c4fbc53385e98569e810be9843de">reserve()</a>]]</code> elements
5907                 will be overwritten at the end of the <code>circular_buffer</code>.<br>
5908                 (See <i>Example</i> for the explanation.)
5909               </dd>
5910             </dl>
5911             <dl>
5912               <dt>
5913                 <b>Parameter(s):</b>
5914               </dt>
5915               <dd>
5916                 <dl compact>
5917                   <dt>
5918                     <code>pos</code>
5919                   </dt>
5920                   <dd>
5921                     An iterator specifying the position where the range will be inserted.
5922                   </dd>
5923                 </dl>
5924               </dd>
5925               <dd>
5926                 <dl compact>
5927                   <dt>
5928                     <code>first</code>
5929                   </dt>
5930                   <dd>
5931                     The beginning of the range to be inserted.
5932                   </dd>
5933                 </dl>
5934               </dd>
5935               <dd>
5936                 <dl compact>
5937                   <dt>
5938                     <code>last</code>
5939                   </dt>
5940                   <dd>
5941                     The end of the range to be inserted.
5942                   </dd>
5943                 </dl>
5944               </dd>
5945             </dl>
5946             <dl>
5947               <dt>
5948                 <b>Throws:</b>
5949               </dt>
5950               <dd>
5951                 Whatever <code>T::T(const T&amp;)</code> throws.
5952               </dd>
5953               <dd>
5954                 Whatever <code>T::operator = (const T&amp;)</code> throws.
5955               </dd>
5956             </dl>
5957             <dl>
5958               <dt>
5959                 <b>Exception Safety:</b>
5960               </dt>
5961               <dd>
5962                 Basic; no-throw if the operations in the <i>Throws</i> section do not throw anything.
5963               </dd>
5964             </dl>
5965             <dl>
5966               <dt>
5967                 <b>Iterator Invalidation:</b>
5968               </dt>
5969               <dd>
5970                 Invalidates iterators pointing to the elements before the insertion point (towards the beginning and
5971                 excluding <code>pos</code>). It also invalidates iterators pointing to the overwritten elements.
5972               </dd>
5973             </dl>
5974             <dl>
5975               <dt>
5976                 <b>Complexity:</b>
5977               </dt>
5978               <dd>
5979                 Linear (in <code>[std::distance(<a href=
5980                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, pos) +
5981                 std::distance(first, last)]</code>; in <code>min[<a href=
5982                 "#classboost_1_1circular__buffer_15ebab2b2538d733790b5752582728e77">capacity()</a>,
5983                 std::distance(<a href="#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>,
5984                 pos) + std::distance(first, last)]</code> if the <code>InputIterator</code> is a <a href=
5985                 "http://www.sgi.com/tech/stl/RandomAccessIterator.html">RandomAccessIterator</a>).
5986               </dd>
5987             </dl>
5988             <dl>
5989               <dt>
5990                 <b>Example:</b>
5991               </dt>
5992               <dd>
5993                 Consider a <code>circular_buffer</code> with the capacity of 6 and the size of 4. Its internal buffer
5994                 may look like the one below.<br>
5995                 <br>
5996                 <code>|1|2|3|4| | |</code><br>
5997                 <code>p ---^</code><br>
5998                 <br>
5999                 After inserting a range of elements before the position <code>p</code>:<br>
6000                 <br>
6001                 <code>int array[] = { 5, 6, 7, 8, 9 };</code><br>
6002                 <code>insert(p, array, array + 5);</code><br>
6003                 <br>
6004                 actually only elements <code>5</code>, <code>6</code>, <code>7</code> and <code>8</code> from the
6005                 specified range get inserted and elements <code>3</code> and <code>4</code> are overwritten. This is
6006                 due to the fact the rinsert operation preserves the capacity. After insertion the internal buffer looks
6007                 like this:<br>
6008                 <br>
6009                 <code>|1|2|5|6|7|8|</code><br>
6010                 <br>
6011                 For comparison if the capacity would not be preserved the internal buffer would then result in
6012                 <code>|1|2|5|6|7|8|9|3|4|</code>.
6013               </dd>
6014             </dl>
6015             <dl>
6016               <dt>
6017                 <b>See Also:</b>
6018               </dt>
6019               <dd>
6020                 <code><a href="#classboost_1_1circular__buffer_12c9332f457bf5bb3128463cf528c058c">rinsert(iterator,
6021                 value_type)</a></code>, <code><a href=
6022                 "#classboost_1_1circular__buffer_1a47a5358db1b7d7e4925c16db13d2fc5">rinsert(iterator, size_type,
6023                 value_type)</a></code>, <code><a href=
6024                 "#classboost_1_1circular__buffer_128c92740fee1b9deb8c69816e389de95">insert(iterator,
6025                 value_type)</a></code>, <code><a href=
6026                 "#classboost_1_1circular__buffer_1b2f197c99d47138db777f0a46783b140">insert(iterator, size_type,
6027                 value_type)</a></code>, <code><a href=
6028                 "#classboost_1_1circular__buffer_1d00091d1d794cab3264b3674e99b33f6">insert(iterator, InputIterator,
6029                 InputIterator)</a></code>
6030               </dd>
6031             </dl>
6032           </td>
6033         </tr>
6034         <tr>
6035           <td>
6036             <a id="classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3" name=
6037             "classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3"></a><code><b><a href=
6038             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> erase(<a href=
6039             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> pos);</b></code><br>
6040             <br>
6041             Remove an element at the specified position.
6042             <dl>
6043               <dt>
6044                 <b>Precondition:</b>
6045               </dt>
6046               <dd>
6047                 <code>pos</code> is a valid iterator pointing to the <code>circular_buffer</code> (but not an
6048                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>).
6049               </dd>
6050             </dl>
6051             <dl>
6052               <dt>
6053                 <b>Effect:</b>
6054               </dt>
6055               <dd>
6056                 The element at the position <code>pos</code> is removed.
6057               </dd>
6058             </dl>
6059             <dl>
6060               <dt>
6061                 <b>Parameter(s):</b>
6062               </dt>
6063               <dd>
6064                 <dl compact>
6065                   <dt>
6066                     <code>pos</code>
6067                   </dt>
6068                   <dd>
6069                     An iterator pointing at the element to be removed.
6070                   </dd>
6071                 </dl>
6072               </dd>
6073             </dl>
6074             <dl>
6075               <dt>
6076                 <b>Returns:</b>
6077               </dt>
6078               <dd>
6079                 Iterator to the first element remaining beyond the removed element or <code><a href=
6080                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code> if no such element
6081                 exists.
6082               </dd>
6083             </dl>
6084             <dl>
6085               <dt>
6086                 <b>Throws:</b>
6087               </dt>
6088               <dd>
6089                 Whatever <code>T::operator = (const T&amp;)</code> throws.
6090               </dd>
6091             </dl>
6092             <dl>
6093               <dt>
6094                 <b>Exception Safety:</b>
6095               </dt>
6096               <dd>
6097                 Basic; no-throw if the operation in the <i>Throws</i> section does not throw anything.
6098               </dd>
6099             </dl>
6100             <dl>
6101               <dt>
6102                 <b>Iterator Invalidation:</b>
6103               </dt>
6104               <dd>
6105                 Invalidates iterators pointing to the erased element and iterators pointing to the elements behind the
6106                 erased element (towards the end; except iterators equal to <code><a href=
6107                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>).
6108               </dd>
6109             </dl>
6110             <dl>
6111               <dt>
6112                 <b>Complexity:</b>
6113               </dt>
6114               <dd>
6115                 Linear (in <code>std::distance(pos, <a href=
6116                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>)</code>).
6117               </dd>
6118             </dl>
6119             <dl>
6120               <dt>
6121                 <b>See Also:</b>
6122               </dt>
6123               <dd>
6124                 <code><a href="#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase(iterator,
6125                 iterator)</a></code>, <code><a href=
6126                 "#classboost_1_1circular__buffer_1b6d4ae77d7445f844e30e78592f1e06f">rerase(iterator)</a></code>,
6127                 <code><a href="#classboost_1_1circular__buffer_1b0f98ae303584ded5397f067bbfc911f">rerase(iterator,
6128                 iterator)</a></code>, <code><a href=
6129                 "#classboost_1_1circular__buffer_1b25d379cf66ace025036a47ddb344abd">erase_begin(size_type)</a></code>,
6130                 <code><a href=
6131                 "#classboost_1_1circular__buffer_17485ee7f58b01363170114f2123a48d7">erase_end(size_type)</a></code>,
6132                 <code><a href="#classboost_1_1circular__buffer_1826f5770a40b8b752eb9587378464d1e">clear()</a></code>
6133               </dd>
6134             </dl>
6135           </td>
6136         </tr>
6137         <tr>
6138           <td>
6139             <a id="classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd" name=
6140             "classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd"></a><code><b><a href=
6141             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> erase(<a href=
6142             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> first, <a href=
6143             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> last);</b></code><br>
6144             <br>
6145             Erase the range <code>[first, last)</code>.
6146             <dl>
6147               <dt>
6148                 <b>Precondition:</b>
6149               </dt>
6150               <dd>
6151                 Valid range <code>[first, last)</code>.
6152               </dd>
6153             </dl>
6154             <dl>
6155               <dt>
6156                 <b>Effect:</b>
6157               </dt>
6158               <dd>
6159                 The elements from the range <code>[first, last)</code> are removed. (If <code>first == last</code>
6160                 nothing is removed.)
6161               </dd>
6162             </dl>
6163             <dl>
6164               <dt>
6165                 <b>Parameter(s):</b>
6166               </dt>
6167               <dd>
6168                 <dl compact>
6169                   <dt>
6170                     <code>first</code>
6171                   </dt>
6172                   <dd>
6173                     The beginning of the range to be removed.
6174                   </dd>
6175                 </dl>
6176               </dd>
6177               <dd>
6178                 <dl compact>
6179                   <dt>
6180                     <code>last</code>
6181                   </dt>
6182                   <dd>
6183                     The end of the range to be removed.
6184                   </dd>
6185                 </dl>
6186               </dd>
6187             </dl>
6188             <dl>
6189               <dt>
6190                 <b>Returns:</b>
6191               </dt>
6192               <dd>
6193                 Iterator to the first element remaining beyond the removed elements or <code><a href=
6194                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code> if no such element
6195                 exists.
6196               </dd>
6197             </dl>
6198             <dl>
6199               <dt>
6200                 <b>Throws:</b>
6201               </dt>
6202               <dd>
6203                 Whatever <code>T::operator = (const T&amp;)</code> throws.
6204               </dd>
6205             </dl>
6206             <dl>
6207               <dt>
6208                 <b>Exception Safety:</b>
6209               </dt>
6210               <dd>
6211                 Basic; no-throw if the operation in the <i>Throws</i> section does not throw anything.
6212               </dd>
6213             </dl>
6214             <dl>
6215               <dt>
6216                 <b>Iterator Invalidation:</b>
6217               </dt>
6218               <dd>
6219                 Invalidates iterators pointing to the erased elements and iterators pointing to the elements behind the
6220                 erased range (towards the end; except iterators equal to <code><a href=
6221                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>).
6222               </dd>
6223             </dl>
6224             <dl>
6225               <dt>
6226                 <b>Complexity:</b>
6227               </dt>
6228               <dd>
6229                 Linear (in <code>std::distance(first, <a href=
6230                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>)</code>).
6231               </dd>
6232             </dl>
6233             <dl>
6234               <dt>
6235                 <b>See Also:</b>
6236               </dt>
6237               <dd>
6238                 <code><a href=
6239                 "#classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3">erase(iterator)</a></code>,
6240                 <code><a href=
6241                 "#classboost_1_1circular__buffer_1b6d4ae77d7445f844e30e78592f1e06f">rerase(iterator)</a></code>,
6242                 <code><a href="#classboost_1_1circular__buffer_1b0f98ae303584ded5397f067bbfc911f">rerase(iterator,
6243                 iterator)</a></code>, <code><a href=
6244                 "#classboost_1_1circular__buffer_1b25d379cf66ace025036a47ddb344abd">erase_begin(size_type)</a></code>,
6245                 <code><a href=
6246                 "#classboost_1_1circular__buffer_17485ee7f58b01363170114f2123a48d7">erase_end(size_type)</a></code>,
6247                 <code><a href="#classboost_1_1circular__buffer_1826f5770a40b8b752eb9587378464d1e">clear()</a></code>
6248               </dd>
6249             </dl>
6250           </td>
6251         </tr>
6252         <tr>
6253           <td>
6254             <a id="classboost_1_1circular__buffer_1b6d4ae77d7445f844e30e78592f1e06f" name=
6255             "classboost_1_1circular__buffer_1b6d4ae77d7445f844e30e78592f1e06f"></a><code><b><a href=
6256             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> rerase(<a href=
6257             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> pos);</b></code><br>
6258             <br>
6259             Remove an element at the specified position.
6260             <dl>
6261               <dt>
6262                 <b>Precondition:</b>
6263               </dt>
6264               <dd>
6265                 <code>pos</code> is a valid iterator pointing to the <code>circular_buffer</code> (but not an
6266                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>).
6267               </dd>
6268             </dl>
6269             <dl>
6270               <dt>
6271                 <b>Effect:</b>
6272               </dt>
6273               <dd>
6274                 The element at the position <code>pos</code> is removed.
6275               </dd>
6276             </dl>
6277             <dl>
6278               <dt>
6279                 <b>Parameter(s):</b>
6280               </dt>
6281               <dd>
6282                 <dl compact>
6283                   <dt>
6284                     <code>pos</code>
6285                   </dt>
6286                   <dd>
6287                     An iterator pointing at the element to be removed.
6288                   </dd>
6289                 </dl>
6290               </dd>
6291             </dl>
6292             <dl>
6293               <dt>
6294                 <b>Returns:</b>
6295               </dt>
6296               <dd>
6297                 Iterator to the first element remaining in front of the removed element or <code><a href=
6298                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a></code> if no such
6299                 element exists.
6300               </dd>
6301             </dl>
6302             <dl>
6303               <dt>
6304                 <b>Throws:</b>
6305               </dt>
6306               <dd>
6307                 Whatever <code>T::operator = (const T&amp;)</code> throws.
6308               </dd>
6309             </dl>
6310             <dl>
6311               <dt>
6312                 <b>Exception Safety:</b>
6313               </dt>
6314               <dd>
6315                 Basic; no-throw if the operation in the <i>Throws</i> section does not throw anything.
6316               </dd>
6317             </dl>
6318             <dl>
6319               <dt>
6320                 <b>Iterator Invalidation:</b>
6321               </dt>
6322               <dd>
6323                 Invalidates iterators pointing to the erased element and iterators pointing to the elements in front of
6324                 the erased element (towards the beginning).
6325               </dd>
6326             </dl>
6327             <dl>
6328               <dt>
6329                 <b>Complexity:</b>
6330               </dt>
6331               <dd>
6332                 Linear (in <code>std::distance(<a href=
6333                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, pos)</code>).
6334               </dd>
6335             </dl>
6336             <dl>
6337               <dt>
6338                 <b>Note:</b>
6339               </dt>
6340               <dd>
6341                 This method is symetric to the <code><a href=
6342                 "#classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3">erase(iterator)</a></code> method
6343                 and is more effective than <code><a href=
6344                 "#classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3">erase(iterator)</a></code> if the
6345                 iterator <code>pos</code> is close to the beginning of the <code>circular_buffer</code>. (See the
6346                 <i>Complexity</i>.)
6347               </dd>
6348             </dl>
6349             <dl>
6350               <dt>
6351                 <b>See Also:</b>
6352               </dt>
6353               <dd>
6354                 <code><a href=
6355                 "#classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3">erase(iterator)</a></code>,
6356                 <code><a href="#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase(iterator,
6357                 iterator)</a></code>, <code><a href=
6358                 "#classboost_1_1circular__buffer_1b0f98ae303584ded5397f067bbfc911f">rerase(iterator,
6359                 iterator)</a></code>, <code><a href=
6360                 "#classboost_1_1circular__buffer_1b25d379cf66ace025036a47ddb344abd">erase_begin(size_type)</a></code>,
6361                 <code><a href=
6362                 "#classboost_1_1circular__buffer_17485ee7f58b01363170114f2123a48d7">erase_end(size_type)</a></code>,
6363                 <code><a href="#classboost_1_1circular__buffer_1826f5770a40b8b752eb9587378464d1e">clear()</a></code>
6364               </dd>
6365             </dl>
6366           </td>
6367         </tr>
6368         <tr>
6369           <td>
6370             <a id="classboost_1_1circular__buffer_1b0f98ae303584ded5397f067bbfc911f" name=
6371             "classboost_1_1circular__buffer_1b0f98ae303584ded5397f067bbfc911f"></a><code><b><a href=
6372             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> rerase(<a href=
6373             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> first, <a href=
6374             "#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a> last);</b></code><br>
6375             <br>
6376             Erase the range <code>[first, last)</code>.
6377             <dl>
6378               <dt>
6379                 <b>Precondition:</b>
6380               </dt>
6381               <dd>
6382                 Valid range <code>[first, last)</code>.
6383               </dd>
6384             </dl>
6385             <dl>
6386               <dt>
6387                 <b>Effect:</b>
6388               </dt>
6389               <dd>
6390                 The elements from the range <code>[first, last)</code> are removed. (If <code>first == last</code>
6391                 nothing is removed.)
6392               </dd>
6393             </dl>
6394             <dl>
6395               <dt>
6396                 <b>Parameter(s):</b>
6397               </dt>
6398               <dd>
6399                 <dl compact>
6400                   <dt>
6401                     <code>first</code>
6402                   </dt>
6403                   <dd>
6404                     The beginning of the range to be removed.
6405                   </dd>
6406                 </dl>
6407               </dd>
6408               <dd>
6409                 <dl compact>
6410                   <dt>
6411                     <code>last</code>
6412                   </dt>
6413                   <dd>
6414                     The end of the range to be removed.
6415                   </dd>
6416                 </dl>
6417               </dd>
6418             </dl>
6419             <dl>
6420               <dt>
6421                 <b>Returns:</b>
6422               </dt>
6423               <dd>
6424                 Iterator to the first element remaining in front of the removed elements or <code><a href=
6425                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a></code> if no such
6426                 element exists.
6427               </dd>
6428             </dl>
6429             <dl>
6430               <dt>
6431                 <b>Throws:</b>
6432               </dt>
6433               <dd>
6434                 Whatever <code>T::operator = (const T&amp;)</code> throws.
6435               </dd>
6436             </dl>
6437             <dl>
6438               <dt>
6439                 <b>Exception Safety:</b>
6440               </dt>
6441               <dd>
6442                 Basic; no-throw if the operation in the <i>Throws</i> section does not throw anything.
6443               </dd>
6444             </dl>
6445             <dl>
6446               <dt>
6447                 <b>Iterator Invalidation:</b>
6448               </dt>
6449               <dd>
6450                 Invalidates iterators pointing to the erased elements and iterators pointing to the elements in front
6451                 of the erased range (towards the beginning).
6452               </dd>
6453             </dl>
6454             <dl>
6455               <dt>
6456                 <b>Complexity:</b>
6457               </dt>
6458               <dd>
6459                 Linear (in <code>std::distance(<a href=
6460                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, last)</code>).
6461               </dd>
6462             </dl>
6463             <dl>
6464               <dt>
6465                 <b>Note:</b>
6466               </dt>
6467               <dd>
6468                 This method is symetric to the <code><a href=
6469                 "#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase(iterator,
6470                 iterator)</a></code> method and is more effective than <code><a href=
6471                 "#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase(iterator,
6472                 iterator)</a></code> if <code>std::distance(<a href=
6473                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, first)</code> is lower
6474                 that <code>std::distance(last, <a href=
6475                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>)</code>.
6476               </dd>
6477             </dl>
6478             <dl>
6479               <dt>
6480                 <b>See Also:</b>
6481               </dt>
6482               <dd>
6483                 <code><a href=
6484                 "#classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3">erase(iterator)</a></code>,
6485                 <code><a href="#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase(iterator,
6486                 iterator)</a></code>, <code><a href=
6487                 "#classboost_1_1circular__buffer_1b6d4ae77d7445f844e30e78592f1e06f">rerase(iterator)</a></code>,
6488                 <code><a href=
6489                 "#classboost_1_1circular__buffer_1b25d379cf66ace025036a47ddb344abd">erase_begin(size_type)</a></code>,
6490                 <code><a href=
6491                 "#classboost_1_1circular__buffer_17485ee7f58b01363170114f2123a48d7">erase_end(size_type)</a></code>,
6492                 <code><a href="#classboost_1_1circular__buffer_1826f5770a40b8b752eb9587378464d1e">clear()</a></code>
6493               </dd>
6494             </dl>
6495           </td>
6496         </tr>
6497         <tr>
6498           <td>
6499             <a id="classboost_1_1circular__buffer_1b25d379cf66ace025036a47ddb344abd" name=
6500             "classboost_1_1circular__buffer_1b25d379cf66ace025036a47ddb344abd"></a><code><b>void erase_begin(<a href=
6501             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> n);</b></code><br>
6502             <br>
6503             Remove first <code>n</code> elements (with constant complexity for scalar types).
6504             <dl>
6505               <dt>
6506                 <b>Precondition:</b>
6507               </dt>
6508               <dd>
6509                 <code>n &lt;= <a href=
6510                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>
6511               </dd>
6512             </dl>
6513             <dl>
6514               <dt>
6515                 <b>Effect:</b>
6516               </dt>
6517               <dd>
6518                 The <code>n</code> elements at the beginning of the <code>circular_buffer</code> will be removed.
6519               </dd>
6520             </dl>
6521             <dl>
6522               <dt>
6523                 <b>Parameter(s):</b>
6524               </dt>
6525               <dd>
6526                 <dl compact>
6527                   <dt>
6528                     <code>n</code>
6529                   </dt>
6530                   <dd>
6531                     The number of elements to be removed.
6532                   </dd>
6533                 </dl>
6534               </dd>
6535             </dl>
6536             <dl>
6537               <dt>
6538                 <b>Throws:</b>
6539               </dt>
6540               <dd>
6541                 Whatever <code>T::operator = (const T&amp;)</code> throws. (Does not throw anything in case of
6542                 scalars.)
6543               </dd>
6544             </dl>
6545             <dl>
6546               <dt>
6547                 <b>Exception Safety:</b>
6548               </dt>
6549               <dd>
6550                 Basic; no-throw if the operation in the <i>Throws</i> section does not throw anything. (I.e. no throw
6551                 in case of scalars.)
6552               </dd>
6553             </dl>
6554             <dl>
6555               <dt>
6556                 <b>Iterator Invalidation:</b>
6557               </dt>
6558               <dd>
6559                 Invalidates iterators pointing to the first <code>n</code> erased elements.
6560               </dd>
6561             </dl>
6562             <dl>
6563               <dt>
6564                 <b>Complexity:</b>
6565               </dt>
6566               <dd>
6567                 Constant (in <code>n</code>) for scalar types; linear for other types.
6568               </dd>
6569             </dl>
6570             <dl>
6571               <dt>
6572                 <b>Note:</b>
6573               </dt>
6574               <dd>
6575                 This method has been specially designed for types which do not require an explicit destructruction
6576                 (e.g. integer, float or a pointer). For these scalar types a call to a destructor is not required which
6577                 makes it possible to implement the "erase from beginning" operation with a constant complexity. For
6578                 non-sacalar types the complexity is linear (hence the explicit destruction is needed) and the
6579                 implementation is actually equivalent to <code><a href=
6580                 "#classboost_1_1circular__buffer_1b0f98ae303584ded5397f067bbfc911f">rerase(begin(), begin() +
6581                 n)</a></code>.
6582               </dd>
6583             </dl>
6584             <dl>
6585               <dt>
6586                 <b>See Also:</b>
6587               </dt>
6588               <dd>
6589                 <code><a href=
6590                 "#classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3">erase(iterator)</a></code>,
6591                 <code><a href="#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase(iterator,
6592                 iterator)</a></code>, <code><a href=
6593                 "#classboost_1_1circular__buffer_1b6d4ae77d7445f844e30e78592f1e06f">rerase(iterator)</a></code>,
6594                 <code><a href="#classboost_1_1circular__buffer_1b0f98ae303584ded5397f067bbfc911f">rerase(iterator,
6595                 iterator)</a></code>, <code><a href=
6596                 "#classboost_1_1circular__buffer_17485ee7f58b01363170114f2123a48d7">erase_end(size_type)</a></code>,
6597                 <code><a href="#classboost_1_1circular__buffer_1826f5770a40b8b752eb9587378464d1e">clear()</a></code>
6598               </dd>
6599             </dl>
6600           </td>
6601         </tr>
6602         <tr>
6603           <td>
6604             <a id="classboost_1_1circular__buffer_17485ee7f58b01363170114f2123a48d7" name=
6605             "classboost_1_1circular__buffer_17485ee7f58b01363170114f2123a48d7"></a><code><b>void erase_end(<a href=
6606             "#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a> n);</b></code><br>
6607             <br>
6608             Remove last <code>n</code> elements (with constant complexity for scalar types).
6609             <dl>
6610               <dt>
6611                 <b>Precondition:</b>
6612               </dt>
6613               <dd>
6614                 <code>n &lt;= <a href=
6615                 "#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a></code>
6616               </dd>
6617             </dl>
6618             <dl>
6619               <dt>
6620                 <b>Effect:</b>
6621               </dt>
6622               <dd>
6623                 The <code>n</code> elements at the end of the <code>circular_buffer</code> will be removed.
6624               </dd>
6625             </dl>
6626             <dl>
6627               <dt>
6628                 <b>Parameter(s):</b>
6629               </dt>
6630               <dd>
6631                 <dl compact>
6632                   <dt>
6633                     <code>n</code>
6634                   </dt>
6635                   <dd>
6636                     The number of elements to be removed.
6637                   </dd>
6638                 </dl>
6639               </dd>
6640             </dl>
6641             <dl>
6642               <dt>
6643                 <b>Throws:</b>
6644               </dt>
6645               <dd>
6646                 Whatever <code>T::operator = (const T&amp;)</code> throws. (Does not throw anything in case of
6647                 scalars.)
6648               </dd>
6649             </dl>
6650             <dl>
6651               <dt>
6652                 <b>Exception Safety:</b>
6653               </dt>
6654               <dd>
6655                 Basic; no-throw if the operation in the <i>Throws</i> section does not throw anything. (I.e. no throw
6656                 in case of scalars.)
6657               </dd>
6658             </dl>
6659             <dl>
6660               <dt>
6661                 <b>Iterator Invalidation:</b>
6662               </dt>
6663               <dd>
6664                 Invalidates iterators pointing to the last <code>n</code> erased elements.
6665               </dd>
6666             </dl>
6667             <dl>
6668               <dt>
6669                 <b>Complexity:</b>
6670               </dt>
6671               <dd>
6672                 Constant (in <code>n</code>) for scalar types; linear for other types.
6673               </dd>
6674             </dl>
6675             <dl>
6676               <dt>
6677                 <b>Note:</b>
6678               </dt>
6679               <dd>
6680                 This method has been specially designed for types which do not require an explicit destructruction
6681                 (e.g. integer, float or a pointer). For these scalar types a call to a destructor is not required which
6682                 makes it possible to implement the "erase from end" operation with a constant complexity. For
6683                 non-sacalar types the complexity is linear (hence the explicit destruction is needed) and the
6684                 implementation is actually equivalent to <code><a href=
6685                 "#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase(end() - n, end())</a></code>.
6686               </dd>
6687             </dl>
6688             <dl>
6689               <dt>
6690                 <b>See Also:</b>
6691               </dt>
6692               <dd>
6693                 <code><a href=
6694                 "#classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3">erase(iterator)</a></code>,
6695                 <code><a href="#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase(iterator,
6696                 iterator)</a></code>, <code><a href=
6697                 "#classboost_1_1circular__buffer_1b6d4ae77d7445f844e30e78592f1e06f">rerase(iterator)</a></code>,
6698                 <code><a href="#classboost_1_1circular__buffer_1b0f98ae303584ded5397f067bbfc911f">rerase(iterator,
6699                 iterator)</a></code>, <code><a href=
6700                 "#classboost_1_1circular__buffer_1b25d379cf66ace025036a47ddb344abd">erase_begin(size_type)</a></code>,
6701                 <code><a href="#classboost_1_1circular__buffer_1826f5770a40b8b752eb9587378464d1e">clear()</a></code>
6702               </dd>
6703             </dl>
6704           </td>
6705         </tr>
6706         <tr>
6707           <td>
6708             <a id="classboost_1_1circular__buffer_1826f5770a40b8b752eb9587378464d1e" name=
6709             "classboost_1_1circular__buffer_1826f5770a40b8b752eb9587378464d1e"></a><code><b>void
6710             clear();</b></code><br>
6711             <br>
6712             Remove all stored elements from the <code>circular_buffer</code>.
6713             <dl>
6714               <dt>
6715                 <b>Effect:</b>
6716               </dt>
6717               <dd>
6718                 <code><a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> ==
6719                 0</code>
6720               </dd>
6721             </dl>
6722             <dl>
6723               <dt>
6724                 <b>Throws:</b>
6725               </dt>
6726               <dd>
6727                 Nothing.
6728               </dd>
6729             </dl>
6730             <dl>
6731               <dt>
6732                 <b>Exception Safety:</b>
6733               </dt>
6734               <dd>
6735                 No-throw.
6736               </dd>
6737             </dl>
6738             <dl>
6739               <dt>
6740                 <b>Iterator Invalidation:</b>
6741               </dt>
6742               <dd>
6743                 Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to
6744                 <code><a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a></code>).
6745               </dd>
6746             </dl>
6747             <dl>
6748               <dt>
6749                 <b>Complexity:</b>
6750               </dt>
6751               <dd>
6752                 Constant (in the size of the <code>circular_buffer</code>) for scalar types; linear for other types.
6753               </dd>
6754             </dl>
6755             <dl>
6756               <dt>
6757                 <b>See Also:</b>
6758               </dt>
6759               <dd>
6760                 <code><a href=
6761                 "#classboost_1_1circular__buffer_164250ffbbbdbc62b99e8301fc195b80c">~circular_buffer()</a></code>,
6762                 <code><a href=
6763                 "#classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3">erase(iterator)</a></code>,
6764                 <code><a href="#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase(iterator,
6765                 iterator)</a></code>, <code><a href=
6766                 "#classboost_1_1circular__buffer_1b6d4ae77d7445f844e30e78592f1e06f">rerase(iterator)</a></code>,
6767                 <code><a href="#classboost_1_1circular__buffer_1b0f98ae303584ded5397f067bbfc911f">rerase(iterator,
6768                 iterator)</a></code>, <code><a href=
6769                 "#classboost_1_1circular__buffer_1b25d379cf66ace025036a47ddb344abd">erase_begin(size_type)</a></code>,
6770                 <code><a href=
6771                 "#classboost_1_1circular__buffer_17485ee7f58b01363170114f2123a48d7">erase_end(size_type)</a></code>
6772               </dd>
6773             </dl>
6774           </td>
6775         </tr>
6776       </table>
6777     </div>
6778     <h2>
6779       <a name="functions" id="functions">Standalone Functions</a>
6780     </h2>
6781     <div id="srcdoc_functions">
6782       <table id="table_functions" border="1" cellpadding="3">
6783         <tr>
6784           <td>
6785             <a id="namespaceboost_1d35871e838359b5215e1cbb353663207" name=
6786             "namespaceboost_1d35871e838359b5215e1cbb353663207"></a> <code><b>template &lt;class T, class Alloc&gt;<br>
6787                 bool operator==(const circular_buffer&lt;T,Alloc&gt;&amp; lhs, const
6788             circular_buffer&lt;T,Alloc&gt;&amp; rhs);</b></code><br>
6789             <br>
6790             Compare two <code>circular_buffer</code>s element-by-element to determine if they are equal.
6791             <dl>
6792               <dt>
6793                 <b>Parameter(s):</b>
6794               </dt>
6795               <dd>
6796                 <dl compact>
6797                   <dt>
6798                     <code>lhs</code>
6799                   </dt>
6800                   <dd>
6801                     The <code>circular_buffer</code> to compare.
6802                   </dd>
6803                 </dl>
6804               </dd>
6805               <dd>
6806                 <dl compact>
6807                   <dt>
6808                     <code>rhs</code>
6809                   </dt>
6810                   <dd>
6811                     The <code>circular_buffer</code> to compare.
6812                   </dd>
6813                 </dl>
6814               </dd>
6815             </dl>
6816             <dl>
6817               <dt>
6818                 <b>Returns:</b>
6819               </dt>
6820               <dd>
6821                 <code>lhs.<a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> ==
6822                 rhs.<a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> &amp;&amp;
6823                 <a href="http://www.sgi.com/tech/stl/equal.html">std::equal</a>(lhs.<a href=
6824                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, lhs.<a href=
6825                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>, rhs.<a href=
6826                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>)</code>
6827               </dd>
6828             </dl>
6829             <dl>
6830               <dt>
6831                 <b>Throws:</b>
6832               </dt>
6833               <dd>
6834                 Nothing.
6835               </dd>
6836             </dl>
6837             <dl>
6838               <dt>
6839                 <b>Complexity:</b>
6840               </dt>
6841               <dd>
6842                 Linear (in the size of the <code>circular_buffer</code>s).
6843               </dd>
6844             </dl>
6845             <dl>
6846               <dt>
6847                 <b>Iterator Invalidation:</b>
6848               </dt>
6849               <dd>
6850                 Does not invalidate any iterators.
6851               </dd>
6852             </dl>
6853           </td>
6854         </tr>
6855         <tr>
6856           <td>
6857             <a id="namespaceboost_195b08213f201c2067d8acb024756329d" name=
6858             "namespaceboost_195b08213f201c2067d8acb024756329d"></a> <code><b>template &lt;class T, class Alloc&gt;<br>
6859                 bool operator&lt;(const circular_buffer&lt;T,Alloc&gt;&amp; lhs, const
6860             circular_buffer&lt;T,Alloc&gt;&amp; rhs);</b></code><br>
6861             <br>
6862             Compare two <code>circular_buffer</code>s element-by-element to determine if the left one is lesser than
6863             the right one.
6864             <dl>
6865               <dt>
6866                 <b>Parameter(s):</b>
6867               </dt>
6868               <dd>
6869                 <dl compact>
6870                   <dt>
6871                     <code>lhs</code>
6872                   </dt>
6873                   <dd>
6874                     The <code>circular_buffer</code> to compare.
6875                   </dd>
6876                 </dl>
6877               </dd>
6878               <dd>
6879                 <dl compact>
6880                   <dt>
6881                     <code>rhs</code>
6882                   </dt>
6883                   <dd>
6884                     The <code>circular_buffer</code> to compare.
6885                   </dd>
6886                 </dl>
6887               </dd>
6888             </dl>
6889             <dl>
6890               <dt>
6891                 <b>Returns:</b>
6892               </dt>
6893               <dd>
6894                 <code><a href=
6895                 "http://www.sgi.com/tech/stl/lexicographical_compare.html">std::lexicographical_compare</a>(lhs.<a href="#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>,
6896                 lhs.<a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>, rhs.<a href=
6897                 "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, rhs.<a href=
6898                 "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>)</code>
6899               </dd>
6900             </dl>
6901             <dl>
6902               <dt>
6903                 <b>Throws:</b>
6904               </dt>
6905               <dd>
6906                 Nothing.
6907               </dd>
6908             </dl>
6909             <dl>
6910               <dt>
6911                 <b>Complexity:</b>
6912               </dt>
6913               <dd>
6914                 Linear (in the size of the <code>circular_buffer</code>s).
6915               </dd>
6916             </dl>
6917             <dl>
6918               <dt>
6919                 <b>Iterator Invalidation:</b>
6920               </dt>
6921               <dd>
6922                 Does not invalidate any iterators.
6923               </dd>
6924             </dl>
6925           </td>
6926         </tr>
6927         <tr>
6928           <td>
6929             <a id="namespaceboost_1f5717e2f6532581a6492ff1839b18f6d" name=
6930             "namespaceboost_1f5717e2f6532581a6492ff1839b18f6d"></a> <code><b>template &lt;class T, class Alloc&gt;<br>
6931                 bool operator!=(const circular_buffer&lt;T,Alloc&gt;&amp; lhs, const
6932             circular_buffer&lt;T,Alloc&gt;&amp; rhs);</b></code><br>
6933             <br>
6934             Compare two <code>circular_buffer</code>s element-by-element to determine if they are non-equal.
6935             <dl>
6936               <dt>
6937                 <b>Parameter(s):</b>
6938               </dt>
6939               <dd>
6940                 <dl compact>
6941                   <dt>
6942                     <code>lhs</code>
6943                   </dt>
6944                   <dd>
6945                     The <code>circular_buffer</code> to compare.
6946                   </dd>
6947                 </dl>
6948               </dd>
6949               <dd>
6950                 <dl compact>
6951                   <dt>
6952                     <code>rhs</code>
6953                   </dt>
6954                   <dd>
6955                     The <code>circular_buffer</code> to compare.
6956                   </dd>
6957                 </dl>
6958               </dd>
6959             </dl>
6960             <dl>
6961               <dt>
6962                 <b>Returns:</b>
6963               </dt>
6964               <dd>
6965                 <code>!(lhs == rhs)</code>
6966               </dd>
6967             </dl>
6968             <dl>
6969               <dt>
6970                 <b>Throws:</b>
6971               </dt>
6972               <dd>
6973                 Nothing.
6974               </dd>
6975             </dl>
6976             <dl>
6977               <dt>
6978                 <b>Complexity:</b>
6979               </dt>
6980               <dd>
6981                 Linear (in the size of the <code>circular_buffer</code>s).
6982               </dd>
6983             </dl>
6984             <dl>
6985               <dt>
6986                 <b>Iterator Invalidation:</b>
6987               </dt>
6988               <dd>
6989                 Does not invalidate any iterators.
6990               </dd>
6991             </dl>
6992             <dl>
6993               <dt>
6994                 <b>See Also:</b>
6995               </dt>
6996               <dd>
6997                 <code><a href="#namespaceboost_1d35871e838359b5215e1cbb353663207">operator==(const
6998                 circular_buffer&lt;T,Alloc&gt;&amp;, const circular_buffer&lt;T,Alloc&gt;&amp;)</a></code>
6999               </dd>
7000             </dl>
7001           </td>
7002         </tr>
7003         <tr>
7004           <td>
7005             <a id="namespaceboost_1f575d7a9741c2044424de50c966c12f3" name=
7006             "namespaceboost_1f575d7a9741c2044424de50c966c12f3"></a> <code><b>template &lt;class T, class Alloc&gt;<br>
7007                 bool operator&gt;(const circular_buffer&lt;T,Alloc&gt;&amp; lhs, const
7008             circular_buffer&lt;T,Alloc&gt;&amp; rhs);</b></code><br>
7009             <br>
7010             Compare two <code>circular_buffer</code>s element-by-element to determine if the left one is greater than
7011             the right one.
7012             <dl>
7013               <dt>
7014                 <b>Parameter(s):</b>
7015               </dt>
7016               <dd>
7017                 <dl compact>
7018                   <dt>
7019                     <code>lhs</code>
7020                   </dt>
7021                   <dd>
7022                     The <code>circular_buffer</code> to compare.
7023                   </dd>
7024                 </dl>
7025               </dd>
7026               <dd>
7027                 <dl compact>
7028                   <dt>
7029                     <code>rhs</code>
7030                   </dt>
7031                   <dd>
7032                     The <code>circular_buffer</code> to compare.
7033                   </dd>
7034                 </dl>
7035               </dd>
7036             </dl>
7037             <dl>
7038               <dt>
7039                 <b>Returns:</b>
7040               </dt>
7041               <dd>
7042                 <code>rhs &lt; lhs</code>
7043               </dd>
7044             </dl>
7045             <dl>
7046               <dt>
7047                 <b>Throws:</b>
7048               </dt>
7049               <dd>
7050                 Nothing.
7051               </dd>
7052             </dl>
7053             <dl>
7054               <dt>
7055                 <b>Complexity:</b>
7056               </dt>
7057               <dd>
7058                 Linear (in the size of the <code>circular_buffer</code>s).
7059               </dd>
7060             </dl>
7061             <dl>
7062               <dt>
7063                 <b>Iterator Invalidation:</b>
7064               </dt>
7065               <dd>
7066                 Does not invalidate any iterators.
7067               </dd>
7068             </dl>
7069             <dl>
7070               <dt>
7071                 <b>See Also:</b>
7072               </dt>
7073               <dd>
7074                 <code><a href="#namespaceboost_195b08213f201c2067d8acb024756329d">operator&lt;(const
7075                 circular_buffer&lt;T,Alloc&gt;&amp;, const circular_buffer&lt;T,Alloc&gt;&amp;)</a></code>
7076               </dd>
7077             </dl>
7078           </td>
7079         </tr>
7080         <tr>
7081           <td>
7082             <a id="namespaceboost_179abcbacd24b67f08185db54aec8600d" name=
7083             "namespaceboost_179abcbacd24b67f08185db54aec8600d"></a> <code><b>template &lt;class T, class Alloc&gt;<br>
7084                 bool operator&lt;=(const circular_buffer&lt;T,Alloc&gt;&amp; lhs, const
7085             circular_buffer&lt;T,Alloc&gt;&amp; rhs);</b></code><br>
7086             <br>
7087             Compare two <code>circular_buffer</code>s element-by-element to determine if the left one is lesser or
7088             equal to the right one.
7089             <dl>
7090               <dt>
7091                 <b>Parameter(s):</b>
7092               </dt>
7093               <dd>
7094                 <dl compact>
7095                   <dt>
7096                     <code>lhs</code>
7097                   </dt>
7098                   <dd>
7099                     The <code>circular_buffer</code> to compare.
7100                   </dd>
7101                 </dl>
7102               </dd>
7103               <dd>
7104                 <dl compact>
7105                   <dt>
7106                     <code>rhs</code>
7107                   </dt>
7108                   <dd>
7109                     The <code>circular_buffer</code> to compare.
7110                   </dd>
7111                 </dl>
7112               </dd>
7113             </dl>
7114             <dl>
7115               <dt>
7116                 <b>Returns:</b>
7117               </dt>
7118               <dd>
7119                 <code>!(rhs &lt; lhs)</code>
7120               </dd>
7121             </dl>
7122             <dl>
7123               <dt>
7124                 <b>Throws:</b>
7125               </dt>
7126               <dd>
7127                 Nothing.
7128               </dd>
7129             </dl>
7130             <dl>
7131               <dt>
7132                 <b>Complexity:</b>
7133               </dt>
7134               <dd>
7135                 Linear (in the size of the <code>circular_buffer</code>s).
7136               </dd>
7137             </dl>
7138             <dl>
7139               <dt>
7140                 <b>Iterator Invalidation:</b>
7141               </dt>
7142               <dd>
7143                 Does not invalidate any iterators.
7144               </dd>
7145             </dl>
7146             <dl>
7147               <dt>
7148                 <b>See Also:</b>
7149               </dt>
7150               <dd>
7151                 <code><a href="#namespaceboost_195b08213f201c2067d8acb024756329d">operator&lt;(const
7152                 circular_buffer&lt;T,Alloc&gt;&amp;, const circular_buffer&lt;T,Alloc&gt;&amp;)</a></code>
7153               </dd>
7154             </dl>
7155           </td>
7156         </tr>
7157         <tr>
7158           <td>
7159             <a id="namespaceboost_11c31150380272af67deebef578c80b05" name=
7160             "namespaceboost_11c31150380272af67deebef578c80b05"></a> <code><b>template &lt;class T, class Alloc&gt;<br>
7161                 bool operator&gt;=(const circular_buffer&lt;T,Alloc&gt;&amp; lhs, const
7162             circular_buffer&lt;T,Alloc&gt;&amp; rhs);</b></code><br>
7163             <br>
7164             Compare two <code>circular_buffer</code>s element-by-element to determine if the left one is greater or
7165             equal to the right one.
7166             <dl>
7167               <dt>
7168                 <b>Parameter(s):</b>
7169               </dt>
7170               <dd>
7171                 <dl compact>
7172                   <dt>
7173                     <code>lhs</code>
7174                   </dt>
7175                   <dd>
7176                     The <code>circular_buffer</code> to compare.
7177                   </dd>
7178                 </dl>
7179               </dd>
7180               <dd>
7181                 <dl compact>
7182                   <dt>
7183                     <code>rhs</code>
7184                   </dt>
7185                   <dd>
7186                     The <code>circular_buffer</code> to compare.
7187                   </dd>
7188                 </dl>
7189               </dd>
7190             </dl>
7191             <dl>
7192               <dt>
7193                 <b>Returns:</b>
7194               </dt>
7195               <dd>
7196                 <code>!(lhs &lt; rhs)</code>
7197               </dd>
7198             </dl>
7199             <dl>
7200               <dt>
7201                 <b>Throws:</b>
7202               </dt>
7203               <dd>
7204                 Nothing.
7205               </dd>
7206             </dl>
7207             <dl>
7208               <dt>
7209                 <b>Complexity:</b>
7210               </dt>
7211               <dd>
7212                 Linear (in the size of the <code>circular_buffer</code>s).
7213               </dd>
7214             </dl>
7215             <dl>
7216               <dt>
7217                 <b>Iterator Invalidation:</b>
7218               </dt>
7219               <dd>
7220                 Does not invalidate any iterators.
7221               </dd>
7222             </dl>
7223             <dl>
7224               <dt>
7225                 <b>See Also:</b>
7226               </dt>
7227               <dd>
7228                 <code><a href="#namespaceboost_195b08213f201c2067d8acb024756329d">operator&lt;(const
7229                 circular_buffer&lt;T,Alloc&gt;&amp;, const circular_buffer&lt;T,Alloc&gt;&amp;)</a></code>
7230               </dd>
7231             </dl>
7232           </td>
7233         </tr>
7234         <tr>
7235           <td>
7236             <a id="namespaceboost_14aa8f6a2c9640f3f22e266f0fca85777" name=
7237             "namespaceboost_14aa8f6a2c9640f3f22e266f0fca85777"></a> <code><b>template &lt;class T, class Alloc&gt;<br>
7238                 void swap(circular_buffer&lt;T,Alloc&gt;&amp; lhs, circular_buffer&lt;T,Alloc&gt;&amp;
7239             rhs);</b></code><br>
7240             <br>
7241             Swap the contents of two <code>circular_buffer</code>s.
7242             <dl>
7243               <dt>
7244                 <b>Effect:</b>
7245               </dt>
7246               <dd>
7247                 <code>lhs</code> contains elements of <code>rhs</code> and vice versa.
7248               </dd>
7249             </dl>
7250             <dl>
7251               <dt>
7252                 <b>Parameter(s):</b>
7253               </dt>
7254               <dd>
7255                 <dl compact>
7256                   <dt>
7257                     <code>lhs</code>
7258                   </dt>
7259                   <dd>
7260                     The <code>circular_buffer</code> whose content will be swapped with <code>rhs</code>.
7261                   </dd>
7262                 </dl>
7263               </dd>
7264               <dd>
7265                 <dl compact>
7266                   <dt>
7267                     <code>rhs</code>
7268                   </dt>
7269                   <dd>
7270                     The <code>circular_buffer</code> whose content will be swapped with <code>lhs</code>.
7271                   </dd>
7272                 </dl>
7273               </dd>
7274             </dl>
7275             <dl>
7276               <dt>
7277                 <b>Throws:</b>
7278               </dt>
7279               <dd>
7280                 Nothing.
7281               </dd>
7282             </dl>
7283             <dl>
7284               <dt>
7285                 <b>Complexity:</b>
7286               </dt>
7287               <dd>
7288                 Constant (in the size of the <code>circular_buffer</code>s).
7289               </dd>
7290             </dl>
7291             <dl>
7292               <dt>
7293                 <b>Iterator Invalidation:</b>
7294               </dt>
7295               <dd>
7296                 Invalidates all iterators of both <code>circular_buffer</code>s. (On the other hand the iterators still
7297                 point to the same elements but within another container. If you want to rely on this feature you have
7298                 to turn the <a href="#debug">Debug Support</a> off otherwise an assertion will report an error if such
7299                 invalidated iterator is used.)
7300               </dd>
7301             </dl>
7302             <dl>
7303               <dt>
7304                 <b>See Also:</b>
7305               </dt>
7306               <dd>
7307                 <code><a href=
7308                 "#classboost_1_1circular__buffer_1270ab7074c365663a6f18808024fd88b">swap(circular_buffer&lt;T,
7309                 Alloc&gt;&amp;)</a></code>
7310               </dd>
7311             </dl>
7312           </td>
7313         </tr>
7314       </table>
7315     </div>
7316     <h2>
7317       <a name="notes" id="notes">Notes</a>
7318     </h2>
7319     <ol>
7320       <li>
7321         <a name="note1" id="note1"></a>
7322         <p>
7323           A good implementation of smart pointers is included in <a href="../../smart_ptr/">Boost</a>.
7324         </p>
7325       </li>
7326       <li>
7327         <a name="note2" id="note2"></a>
7328         <p>
7329           Never create a circular buffer of <code>std::auto_ptr</code>. Refer to <a href=
7330           "http://www.aristeia.com">Scott Meyers</a> ' excellent book <em>Effective STL</em> for a detailed discussion.
7331           (Meyers S., <i>Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library</i>.
7332           Addison-Wesley, 2001.)
7333         </p>
7334       </li>
7335     </ol>
7336     <h2>
7337       <a name="see" id="see">See also</a>
7338     </h2>
7339     <p>
7340       <code><a href="space_optimized.html">boost::circular_buffer_space_optimized</a>, <a href=
7341       "http://www.sgi.com/tech/stl/Vector.html">std::vector</a>, <a href=
7342       "http://www.sgi.com/tech/stl/List.html">std::list</a>, <a href=
7343       "http://www.sgi.com/tech/stl/Deque.html">std::deque</a></code>
7344     </p>
7345     <h2>
7346       <a name="ack" id="ack">Acknowledgements</a>
7347     </h2>
7348     <p>
7349       The <code>circular_buffer</code> has a short history. Its first version was a <code>std::deque</code> adaptor.
7350       This container was not very effective because of many reallocations when inserting/removing an element. Thomas
7351       Wenish did a review of this version and motivated me to create a circular buffer which allocates memory at once
7352       when created.
7353     </p>
7354     <p>
7355       The second version adapted <code>std::vector</code> but it has been abandoned soon because of limited control
7356       over iterator invalidation.
7357     </p>
7358     <p>
7359       The current version is a full-fledged STL compliant container. Pavel Vozenilek did a thorough review of this
7360       version and came with many good ideas and improvements. Also, I would like to thank Howard Hinnant, Nigel Stewart
7361       and everyone who participated at the formal review for valuable comments and ideas.
7362     </p>
7363     <h2>
7364       <a name="relnotes" id="relnotes">Release Notes</a>
7365     </h2>
7366     <dl>
7367       <dd>
7368         <h3>
7369           Boost 1.42
7370         </h3>
7371       </dd>
7372       <dd>
7373         <ul>
7374           <li>Added methods <code>erase_begin(size_type)</code> and <code>erase_end(size_type)</code> with constant
7375           complexity for such types of stored elements which do not need an explicit destruction e.g. <code>int</code>
7376           or <code>double</code>.
7377           </li>
7378           <li>Similarly changed implementation of the <code>clear()</code> method and the destructor so their
7379           complexity is now constant for such types of stored elements which do not require an explicit destruction
7380           (the complexity for other types remains linear).
7381           </li>
7382         </ul>
7383       </dd>
7384       <dd>
7385         <h3>
7386           Boost 1.37
7387         </h3>
7388       </dd>
7389       <dd>
7390         <ul>
7391           <li>Added new methods <code>is_linearized()</code> and <code>rotate(const_iterator)</code>.
7392           </li>
7393           <li>Fixed bugs:<br>
7394             #1987 Patch to make <code>circular_buffer.hpp</code> #includes absolute.<br>
7395             #1852 Copy constructor does not copy capacity.
7396           </li>
7397         </ul>
7398       </dd>
7399       <dd>
7400         <h3>
7401           Boost 1.36
7402         </h3>
7403       </dd>
7404       <dd>
7405         <ul>
7406           <li>Changed behaviour of the <code>circular_buffer(const allocator_type&amp;)</code> constructor. Since this
7407           version the constructor does not allocate any memory and both capacity and size are set to zero.
7408           </li>
7409           <li>Fixed bug:<br>
7410             #1919 Default constructed circular buffer throws <code>std::bad_alloc</code>.<br>
7411           </li>
7412         </ul>
7413       </dd>
7414       <dd>
7415         <h3>
7416           Boost 1.35
7417         </h3>
7418       </dd>
7419       <dd>
7420         <ul>
7421           <li>Initial release.
7422           </li>
7423         </ul>
7424       </dd>
7425     </dl>
7426     <hr size="1">
7427     <p>
7428       <small>Copyright © 2003-2008 Jan Gaspar</small>
7429     </p>
7430     <p>
7431       <small>Use, modification, and distribution is subject to the Boost Software License, Version 1.0.<br>
7432       (See accompanying file <code>LICENSE_1_0.txt</code> or copy at <a href=
7433       "http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)</small>
7434     </p>
7435   </body>
7436 </html>