[DEV] add v1.76.0

This commit is contained in:
2021-10-05 21:37:46 +02:00
parent a97e9ae7d4
commit d0115b733d
45133 changed files with 4744437 additions and 1026325 deletions

View File

@@ -0,0 +1,75 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Acknowledgements</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="release.html" title="Release Notes">
<link rel="next" href="version_id.html" title="Documentation Version Info">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="release.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="version_id.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="circular_buffer.acknowledgements"></a><a class="link" href="acknowledgements.html" title="Acknowledgements">Acknowledgements</a>
</h2></div></div></div>
<p>
Thomas Witt in 2002 produced a prototype called cyclic buffer.
</p>
<p>
The circular_buffer has a short history. Its first version was a std::deque
adaptor. This container was not very effective because of many reallocations
when inserting/removing an element. Thomas Wenish did a review of this version
and motivated me to create a circular buffer which allocates memory at once
when created.
</p>
<p>
The second version adapted <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span></code>
but it has been abandoned soon because of limited control over iterator invalidation.
The current version is a full-fledged STL compliant container.
</p>
<p>
Pavel Vozenilek did a thorough review of this version and came with many good
ideas and improvements.
</p>
<p>
The idea of the space optimized circular buffer has been introduced by Pavel
Vozenilek.
</p>
<p>
Also, I would like to thank Howard Hinnant, Nigel Stewart and everyone who
participated at the formal review for valuable comments and ideas.
</p>
<p>
Paul A. Bristow refactored the documentation in 2013 to use the full power
of Quickbook, Doxygen and Autoindexing.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="release.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="version_id.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,50 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Modelled Concepts</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="headers.html" title="Header Files">
<link rel="next" href="template_params.html" title="Template Parameters">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="headers.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="template_params.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="circular_buffer.concepts"></a><a class="link" href="concepts.html" title="Modelled Concepts">Modelled Concepts</a>
</h2></div></div></div>
<p>
<a href="https://www.boost.org/sgi/stl/RandomAccessContainer.html" target="_top">Random
Access Container</a>, <a href="https://www.boost.org/sgi/stl/FrontInsertionSequence.html" target="_top">Front
Insertion Sequence</a>, and <a href="https://www.boost.org/sgi/stl/BackInsertionSequence.html" target="_top">Back
Insertion sequence</a>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="headers.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="template_params.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,91 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Circular_buffer example</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="next" href="rationale.html" title="Rationale">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../circular_buffer.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="rationale.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="circular_buffer.example"></a><a class="link" href="example.html" title="Circular_buffer example">Circular_buffer example</a>
</h2></div></div></div>
<p>
Here is a simple example to introduce the class <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>.
</p>
<p>
For all examples, we need this include:
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">circular_buffer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<p>
This example shows construction, inserting elements, overwriting and popping.
</p>
<pre class="programlisting"><span class="comment">// Create a circular buffer with a capacity for 3 integers.</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">circular_buffer</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">cb</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
<span class="comment">// Insert three elements into the buffer.</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
<span class="keyword">int</span> <span class="identifier">a</span> <span class="special">=</span> <span class="identifier">cb</span><span class="special">[</span><span class="number">0</span><span class="special">];</span> <span class="comment">// a == 1</span>
<span class="keyword">int</span> <span class="identifier">b</span> <span class="special">=</span> <span class="identifier">cb</span><span class="special">[</span><span class="number">1</span><span class="special">];</span> <span class="comment">// b == 2</span>
<span class="keyword">int</span> <span class="identifier">c</span> <span class="special">=</span> <span class="identifier">cb</span><span class="special">[</span><span class="number">2</span><span class="special">];</span> <span class="comment">// c == 3</span>
<span class="comment">// The buffer is full now, so pushing subsequent</span>
<span class="comment">// elements will overwrite the front-most elements.</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">4</span><span class="special">);</span> <span class="comment">// Overwrite 1 with 4.</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">5</span><span class="special">);</span> <span class="comment">// Overwrite 2 with 5.</span>
<span class="comment">// The buffer now contains 3, 4 and 5.</span>
<span class="identifier">a</span> <span class="special">=</span> <span class="identifier">cb</span><span class="special">[</span><span class="number">0</span><span class="special">];</span> <span class="comment">// a == 3</span>
<span class="identifier">b</span> <span class="special">=</span> <span class="identifier">cb</span><span class="special">[</span><span class="number">1</span><span class="special">];</span> <span class="comment">// b == 4</span>
<span class="identifier">c</span> <span class="special">=</span> <span class="identifier">cb</span><span class="special">[</span><span class="number">2</span><span class="special">];</span> <span class="comment">// c == 5</span>
<span class="comment">// Elements can be popped from either the front or the back.</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">pop_back</span><span class="special">();</span> <span class="comment">// 5 is removed.</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">pop_front</span><span class="special">();</span> <span class="comment">// 3 is removed.</span>
<span class="comment">// Leaving only one element with value = 4.</span>
<span class="keyword">int</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">cb</span><span class="special">[</span><span class="number">0</span><span class="special">];</span> <span class="comment">// d == 4</span>
</pre>
<p>
You can see the full example code at <a href="../../../libs/circular_buffer/example/circular_buffer_example.cpp" target="_top">circular_buffer_example.cpp</a>.
</p>
<p>
The full annotated description is in the C++ Reference section.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../circular_buffer.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="rationale.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,261 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>More Examples</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="implementation.html" title="Implementation">
<link rel="next" href="headers.html" title="Header Files">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="implementation.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="headers.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="circular_buffer.examples"></a><a class="link" href="examples.html" title="More Examples">More Examples</a>
</h2></div></div></div>
<h4>
<a name="circular_buffer.examples.h0"></a>
<span class="phrase"><a name="circular_buffer.examples.summing_all_the_values_in_a_circ"></a></span><a class="link" href="examples.html#circular_buffer.examples.summing_all_the_values_in_a_circ">Summing
all the values in a circular buffer</a>
</h4>
<p>
This example shows several functions, including summing all valid values.
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">circular_buffer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">numeric</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">assert</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span>
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="comment">/*argc*/</span><span class="special">,</span> <span class="keyword">char</span><span class="special">*</span> <span class="comment">/*argv*/</span><span class="special">[])</span>
<span class="special">{</span>
<span class="comment">// Create a circular buffer of capacity 3.</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">circular_buffer</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">cb</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span>
<span class="comment">// Check is empty.</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">empty</span><span class="special">());</span>
<span class="comment">// Insert some elements into the circular buffer.</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
<span class="comment">// Assertions to check push_backs have expected effect.</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(!</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">full</span><span class="special">());</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span>
<span class="comment">// Insert some other elements.</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">4</span><span class="special">);</span>
<span class="comment">// Evaluate the sum of all elements.</span>
<span class="keyword">int</span> <span class="identifier">sum</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">accumulate</span><span class="special">(</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">cb</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="number">0</span><span class="special">);</span>
<span class="comment">// Assertions to check state.</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">sum</span> <span class="special">==</span> <span class="number">9</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">==</span> <span class="number">4</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(*</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">front</span><span class="special">()</span> <span class="special">==</span> <span class="number">2</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">back</span><span class="special">()</span> <span class="special">==</span> <span class="number">4</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">full</span><span class="special">());</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">cb</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span> <span class="special">==</span> <span class="number">3</span><span class="special">);</span>
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
The <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> has
a capacity of three <code class="computeroutput"><span class="keyword">int</span></code>. Therefore,
the size of the buffer will never exceed three. The <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">accumulate</span></code>
algorithm evaluates the sum of the stored elements. The semantics of the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> can be inferred from
the assertions.
</p>
<p>
You can see the full example code at <a href="../../../libs/circular_buffer/example/circular_buffer_sum_example.cpp" target="_top">circular_buffer_sum_example.cpp</a>.
</p>
<h4>
<a name="circular_buffer.examples.h1"></a>
<span class="phrase"><a name="circular_buffer.examples.bounded_buffer_example"></a></span><a class="link" href="examples.html#circular_buffer.examples.bounded_buffer_example">Bounded
Buffer Example</a>
</h4>
<p>
The bounded buffer is normally used in a producer-consumer mode: producer threads
produce items and store them in the container and consumer threads remove these
items and process them. The bounded buffer has to guarantee that
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
producers do not insert items into the container when the container is
full,
</li>
<li class="listitem">
consumers do not try to remove items when the container is empty,
</li>
<li class="listitem">
each produced item is consumed by exactly one consumer.
</li>
</ul></div>
<p>
This example shows how the <code class="computeroutput"><span class="identifier">circular_buffer</span></code>
can be utilized as an underlying container of the bounded buffer.
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">circular_buffer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">mutex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">condition</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">thread</span><span class="special">/</span><span class="identifier">thread</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">call_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">bind</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">timer</span><span class="special">/</span><span class="identifier">timer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <span class="comment">// for auto_cpu_timer</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">bounded_buffer</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">circular_buffer</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="identifier">container_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">container_type</span><span class="special">::</span><span class="identifier">size_type</span> <span class="identifier">size_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">container_type</span><span class="special">::</span><span class="identifier">value_type</span> <span class="identifier">value_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">call_traits</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;::</span><span class="identifier">param_type</span> <span class="identifier">param_type</span><span class="special">;</span>
<span class="keyword">explicit</span> <span class="identifier">bounded_buffer</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">capacity</span><span class="special">)</span> <span class="special">:</span> <span class="identifier">m_unread</span><span class="special">(</span><span class="number">0</span><span class="special">),</span> <span class="identifier">m_container</span><span class="special">(</span><span class="identifier">capacity</span><span class="special">)</span> <span class="special">{}</span>
<span class="keyword">void</span> <span class="identifier">push_front</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">call_traits</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;::</span><span class="identifier">param_type</span> <span class="identifier">item</span><span class="special">)</span>
<span class="special">{</span> <span class="comment">// `param_type` represents the "best" way to pass a parameter of type `value_type` to a method.</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">::</span><span class="identifier">scoped_lock</span> <span class="identifier">lock</span><span class="special">(</span><span class="identifier">m_mutex</span><span class="special">);</span>
<span class="identifier">m_not_full</span><span class="special">.</span><span class="identifier">wait</span><span class="special">(</span><span class="identifier">lock</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">bind</span><span class="special">(&amp;</span><span class="identifier">bounded_buffer</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;::</span><span class="identifier">is_not_full</span><span class="special">,</span> <span class="keyword">this</span><span class="special">));</span>
<span class="identifier">m_container</span><span class="special">.</span><span class="identifier">push_front</span><span class="special">(</span><span class="identifier">item</span><span class="special">);</span>
<span class="special">++</span><span class="identifier">m_unread</span><span class="special">;</span>
<span class="identifier">lock</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
<span class="identifier">m_not_empty</span><span class="special">.</span><span class="identifier">notify_one</span><span class="special">();</span>
<span class="special">}</span>
<span class="keyword">void</span> <span class="identifier">pop_back</span><span class="special">(</span><span class="identifier">value_type</span><span class="special">*</span> <span class="identifier">pItem</span><span class="special">)</span> <span class="special">{</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span><span class="special">::</span><span class="identifier">scoped_lock</span> <span class="identifier">lock</span><span class="special">(</span><span class="identifier">m_mutex</span><span class="special">);</span>
<span class="identifier">m_not_empty</span><span class="special">.</span><span class="identifier">wait</span><span class="special">(</span><span class="identifier">lock</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">bind</span><span class="special">(&amp;</span><span class="identifier">bounded_buffer</span><span class="special">&lt;</span><span class="identifier">value_type</span><span class="special">&gt;::</span><span class="identifier">is_not_empty</span><span class="special">,</span> <span class="keyword">this</span><span class="special">));</span>
<span class="special">*</span><span class="identifier">pItem</span> <span class="special">=</span> <span class="identifier">m_container</span><span class="special">[--</span><span class="identifier">m_unread</span><span class="special">];</span>
<span class="identifier">lock</span><span class="special">.</span><span class="identifier">unlock</span><span class="special">();</span>
<span class="identifier">m_not_full</span><span class="special">.</span><span class="identifier">notify_one</span><span class="special">();</span>
<span class="special">}</span>
<span class="keyword">private</span><span class="special">:</span>
<span class="identifier">bounded_buffer</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">bounded_buffer</span><span class="special">&amp;);</span> <span class="comment">// Disabled copy constructor.</span>
<span class="identifier">bounded_buffer</span><span class="special">&amp;</span> <span class="keyword">operator</span> <span class="special">=</span> <span class="special">(</span><span class="keyword">const</span> <span class="identifier">bounded_buffer</span><span class="special">&amp;);</span> <span class="comment">// Disabled assign operator.</span>
<span class="keyword">bool</span> <span class="identifier">is_not_empty</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">m_unread</span> <span class="special">&gt;</span> <span class="number">0</span><span class="special">;</span> <span class="special">}</span>
<span class="keyword">bool</span> <span class="identifier">is_not_full</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">m_unread</span> <span class="special">&lt;</span> <span class="identifier">m_container</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">();</span> <span class="special">}</span>
<span class="identifier">size_type</span> <span class="identifier">m_unread</span><span class="special">;</span>
<span class="identifier">container_type</span> <span class="identifier">m_container</span><span class="special">;</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">mutex</span> <span class="identifier">m_mutex</span><span class="special">;</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition</span> <span class="identifier">m_not_empty</span><span class="special">;</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">condition</span> <span class="identifier">m_not_full</span><span class="special">;</span>
<span class="special">};</span> <span class="comment">//</span>
</pre>
<p>
The bounded_buffer relies on <a href="../../../doc/html/thread.html" target="_top">Boost.Thread</a>
and <a href="../../../libs/bind/index.html" target="_top">Boost.Bind</a> libraries and
<a href="../../../libs/utility/call_traits.htm" target="_top">Boost.call_traits utility</a>.
</p>
<p>
The <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html#idm45951347807776-bb">push_front()</a></code>
method is called by the producer thread in order to insert a new item into
the buffer. The method locks the mutex and waits until there is a space for
the new item. (The mutex is unlocked during the waiting stage and has to be
regained when the condition is met.) If there is a space in the buffer available,
the execution continues and the method inserts the item at the end of the
<code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>. Then it
increments the number of unread items and unlocks the mutex (in case an exception
is thrown before the mutex is unlocked, the mutex is unlocked automatically
by the destructor of the scoped_lock). At last the method notifies one of the
consumer threads waiting for a new item to be inserted into the buffer.
</p>
<p>
The <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html#idm45951347763008-bb">pop_back()</a></code>
method is called by the consumer thread in order to read the next item from
the buffer. The method locks the mutex and waits until there is an unread item
in the buffer. If there is at least one unread item, the method decrements
the number of unread items and reads the next item from the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>.
Then it unlocks the mutex and notifies one of the producer threads waiting
for the buffer to free a space for the next item.
</p>
<p>
The <code class="computeroutput"><span class="identifier">bounded</span> <span class="identifier">buffer</span><span class="special">::</span><span class="identifier">pop_back</span><span class="special">()</span></code> method <span class="bold"><strong>does not remove
the item</strong></span> but the item is left in the circular_buffer which then
<span class="bold"><strong>replaces it with a new one</strong></span> (inserted by a
producer) when the circular_buffer is full. This technique is more effective
than removing the item explicitly by calling the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html#idm45951347763008-bb">circular_buffer::pop_back()</a></code>
method of the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>.
</p>
<p>
This claim is based on the assumption that an assignment (replacement) of a
new item into an old one is more effective than a destruction (removal) of
an old item and a consequent inplace construction (insertion) of a new item.
</p>
<p>
For comparison of bounded buffers based on different containers compile and
run <a href="../../../libs/circular_buffer/test/bounded_buffer_comparison.cpp" target="_top">bounded_buffer_comparison.cpp</a>.
The test should reveal the bounded buffer based on the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
is most effective closely followed by the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">deque</span></code> based
bounded buffer. (In reality, the result may differ sometimes because the test
is always affected by external factors such as immediate CPU load.)
</p>
<p>
You can see the full test code at <a href="../../../libs/circular_buffer/test/bounded_buffer_comparison.cpp" target="_top">bounded_buffer_comparison.cpp</a>,
and an example of output is
</p>
<pre class="programlisting"><span class="identifier">Description</span><span class="special">:</span> <span class="identifier">Autorun</span> <span class="string">"J:\Cpp\Misc\Debug\bounded_buffer_comparison.exe"</span>
<span class="identifier">bounded_buffer</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="number">5.15</span> <span class="identifier">s</span>
<span class="identifier">bounded_buffer_space_optimized</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="number">5.71</span> <span class="identifier">s</span>
<span class="identifier">bounded_buffer_deque_based</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="number">15.57</span> <span class="identifier">s</span>
<span class="identifier">bounded_buffer_list_based</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="number">17.33</span> <span class="identifier">s</span>
<span class="identifier">bounded_buffer</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;</span> <span class="number">24.49</span> <span class="identifier">s</span>
<span class="identifier">bounded_buffer_space_optimized</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;</span> <span class="number">28.33</span> <span class="identifier">s</span>
<span class="identifier">bounded_buffer_deque_based</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;</span> <span class="number">29.45</span> <span class="identifier">s</span>
<span class="identifier">bounded_buffer_list_based</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;</span> <span class="number">31.29</span> <span class="identifier">s</span>
</pre>
<p>
.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="implementation.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="headers.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,61 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Header Files</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="examples.html" title="More Examples">
<link rel="next" href="concepts.html" title="Modelled Concepts">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="examples.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="circular_buffer.headers"></a><a class="link" href="headers.html" title="Header Files">Header Files</a>
</h2></div></div></div>
<p>
The circular buffer library is defined in the file <a href="../../../boost/circular_buffer.hpp" target="_top">circular_buffer.hpp</a>.
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">circular_buffer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
<p>
(There is also a forward declaration for the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
in the header file <a href="../../../boost/circular_buffer_fwd.hpp" target="_top">circular_buffer_fwd.hpp</a>).
</p>
<p>
The <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> is
defined in the file <a href="../../../boost/circular_buffer/base.hpp" target="_top">base.hpp</a>.
</p>
<p>
The <code class="computeroutput"><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>
is defined in the file <a href="../../../boost/circular_buffer/space_optimized.hpp" target="_top">space_optimized.hpp</a>.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="examples.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,416 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Implementation</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="rationale.html" title="Rationale">
<link rel="next" href="examples.html" title="More Examples">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="rationale.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="circular_buffer.implementation"></a><a class="link" href="implementation.html" title="Implementation">Implementation </a>
</h2></div></div></div>
<p>
The following paragraphs describe issues that had to be considered during the
implementation of the circular_buffer:
</p>
<h4>
<a name="circular_buffer.implementation.h0"></a>
<span class="phrase"><a name="circular_buffer.implementation.thread_safety"></a></span><a class="link" href="implementation.html#circular_buffer.implementation.thread_safety">Thread-Safety</a>
</h4>
<p>
The thread-safety of the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
is the same as the thread-safety of containers in most STL implementations.
This means the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
is not fully thread-safe. The thread-safety is guaranteed only in the sense
that simultaneous accesses to distinct instances of the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
are safe, and simultaneous read accesses to a shared <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
are safe.
</p>
<p>
If multiple threads access a single <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>,
and at least one of the threads may potentially write, then the user is responsible
for ensuring mutual exclusion between the threads during the container accesses.
The mutual exclusion between the threads can be achieved by wrapping operations
of the underlying <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
with a lock acquisition and release. (See the Bounded Buffer example code at
<a href="../../../libs/circular_buffer/example/circular_buffer_bound_example.cpp" target="_top">circular_buffer_bound_example.cpp</a>)
</p>
<h4>
<a name="circular_buffer.implementation.h1"></a>
<span class="phrase"><a name="circular_buffer.implementation.overwrite_operation"></a></span><a class="link" href="implementation.html#circular_buffer.implementation.overwrite_operation">Overwrite
Operation</a>
</h4>
<p>
Overwrite operation occurs when an element is inserted into a full <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> - the old element
is being overwritten by the new one. There was a discussion what exactly "overwriting
of an element" means during the formal review. It may be either a destruction
of the original element and a consequent inplace construction of a new element
or it may be an assignment of a new element into an old one. The <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> implements assignment
because it is more effective.
</p>
<p>
From the point of business logic of a stored element, the destruction/construction
operation and assignment usually mean the same. However, in very rare cases
(if in any) they may differ. If there is a requirement for elements to be destructed/constructed
instead of being assigned, consider implementing a wrapper of the element which
would implement the assign operator, and store the wrappers instead. It is
necessary to note that storing such wrappers has a drawback. The destruction/construction
will be invoked on every assignment of the wrapper - not only when a wrapper
is being overwritten (when the buffer is full) but also when the stored wrappers
are being shifted (e.g. as a result of insertion into the middle of container).
</p>
<h4>
<a name="circular_buffer.implementation.h2"></a>
<span class="phrase"><a name="circular_buffer.implementation.writing_to_a_full_buffer"></a></span><a class="link" href="implementation.html#circular_buffer.implementation.writing_to_a_full_buffer">Writing to
a Full Buffer</a>
</h4>
<p>
There are several options how to cope if a data source produces more data than
can fit in the fixed-sized buffer:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Inform the data source to wait until there is room in the buffer (e.g.
by throwing an overflow exception).
</li>
<li class="listitem">
If the oldest data is the most important, ignore new data from the source
until there is room in the buffer again.
</li>
<li class="listitem">
If the latest data is the most important, write over the oldest data.
</li>
<li class="listitem">
Let the producer to be responsible for checking the size of the buffer
prior writing into it.
</li>
</ul></div>
<p>
It is apparent that the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
implements the third option. But it may be less apparent it does not implement
any other option - especially the first two. One can get an impression that
the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> should
implement first three options and offer a mechanism of choosing among them.
This impression is wrong.
</p>
<p>
The <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> was
designed and optimized to be circular (which means overwriting the oldest data
when full). If such a controlling mechanism had been enabled, it would just
complicate the matters and the usage of the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
would be probably less straightforward.
</p>
<p>
Moreover, the first two options (and the fourth option as well) do not require
the buffer to be circular at all. If there is a need for the first or second
option, consider implementing an adaptor of e.g. std::vector. In this case
the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> is
not suitable for adapting, because, contrary to std::vector, it bears an overhead
for its circular behaviour.
</p>
<h4>
<a name="circular_buffer.implementation.h3"></a>
<span class="phrase"><a name="circular_buffer.implementation.reading_removing_from_an_empty_b"></a></span><a class="link" href="implementation.html#circular_buffer.implementation.reading_removing_from_an_empty_b">Reading/Removing
from an Empty Buffer</a>
</h4>
<p>
When reading or removing an element from an empty buffer, the buffer should
be able to notify the data consumer (e.g. by throwing underflow exception)
that there are no elements stored in it. The <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
does not implement such a behaviour for two reasons:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
It would introduce a performance overhead.
</li>
<li class="listitem">
No other std container implements it this way.
</li>
</ul></div>
<p>
It is considered to be a bug to read or remove an element (e.g. by calling
<code class="computeroutput"><a class="link" href="../boost/circular_buffer.html#idm45951348265312-bb">front()</a></code> or
<code class="computeroutput"><a class="link" href="../boost/circular_buffer.html#idm45951347763008-bb">pop_back()</a></code>)
from an empty std container and from an empty <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
as well. The data consumer has to test if the container is not empty before
reading/removing from it by testing <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html#idm45951348081232-bb">empty()</a></code>.
However, when reading from the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>,
there is an option to rely on the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html#idm45951348288224-bb">at()</a></code>
method which throws an exception when the index is out of range.
</p>
<h4>
<a name="circular_buffer.implementation.h4"></a>
<span class="phrase"><a name="circular_buffer.implementation.iterator_invalidation"></a></span><a class="link" href="implementation.html#circular_buffer.implementation.iterator_invalidation">Iterator
Invalidation</a>
</h4>
<p>
An iterator is usually considered to be invalidated if an element, the iterator
pointed to, had been removed or overwritten by an another element. This definition
is enforced by the Debug Support and is documented for every method. However,
some applications utilizing <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
may require less strict definition: an iterator is invalid only if it points
to an uninitialized memory.
</p>
<p>
Consider following example:
</p>
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_CB_ENABLE_DEBUG</span> <span class="number">0</span> <span class="comment">// The Debug Support has to be disabled, otherwise the code produces a runtime error.</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">circular_buffer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">assert</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">assert</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span>
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">(</span><span class="keyword">int</span> <span class="comment">/*argc*/</span><span class="special">,</span> <span class="keyword">char</span><span class="special">*</span> <span class="comment">/*argv*/</span><span class="special">[])</span>
<span class="special">{</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">circular_buffer</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="identifier">cb</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">circular_buffer</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;::</span><span class="identifier">iterator</span> <span class="identifier">it</span> <span class="special">=</span> <span class="identifier">cb</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
<span class="identifier">assert</span><span class="special">(*</span><span class="identifier">it</span> <span class="special">==</span> <span class="number">1</span><span class="special">);</span>
<span class="identifier">cb</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">4</span><span class="special">);</span>
<span class="identifier">assert</span><span class="special">(*</span><span class="identifier">it</span> <span class="special">==</span> <span class="number">4</span><span class="special">);</span> <span class="comment">// The iterator still points to the initialized memory.</span>
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
The iterator does not point to the original element any more (and is considered
to be invalid from the "strict" point of view) but it still points
to the same valid place in the memory. This "soft" definition of
iterator invalidation is supported by the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
but should be considered as an implementation detail rather than a full-fledged
feature. The rules when the iterator is still valid can be inferred from the
code in <a href="../../../libs/circular_buffer/test/soft_iterator_invalidation.cpp" target="_top">soft_iterator_invalidation.cpp</a>.
</p>
<h4>
<a name="circular_buffer.implementation.h5"></a>
<span class="phrase"><a name="circular_buffer.implementation.move_emulation_and_rvalues"></a></span><a class="link" href="implementation.html#circular_buffer.implementation.move_emulation_and_rvalues">Move emulation
and rvalues</a>
</h4>
<p>
Since Boost 1.54.0 support for move semantics was implemented using the <a href="../../../libs/move/index.html" target="_top">Boost.Move</a> library. If rvalue references
are available <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
will use them, but if not it uses a close, but imperfect emulation. On such
compilers:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Non-copyable objects can be stored in the containers. They can be constructed
in place using <code class="computeroutput"><span class="identifier">emplace</span></code>,
or if they support Boost.Move, moved into place.
</li>
<li class="listitem">
The containers themselves are not movable.
</li>
<li class="listitem">
Argument forwarding is not perfect.
</li>
</ul></div>
<p>
<code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> will use
rvalues and move emulations for value types only if move constructor and move
assignment operator of the value type do not throw; or if the value type has
no copy constructor.
</p>
<p>
Some methods won't use move constructor for the value type at all, if the constructor
throws. This is required for data consistency and avoidance of situations,
when aftrer an exception <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
contains moved away objects along with the good ones.
</p>
<p>
See documentation for <a href="../../../libs/type_traits/doc/html/boost_typetraits/reference/is_copy_constructible.html" target="_top"><code class="computeroutput"><span class="identifier">is_copy_constructible</span></code></a>, <a href="../../../libs/type_traits/doc/html/boost_typetraits/reference/is_nothrow_move_assignable.html" target="_top"><code class="computeroutput"><span class="identifier">is_nothrow_move_assignable</span></code></a> and <a href="../../../libs/type_traits/doc/html/boost_typetraits/reference/is_nothrow_move_constructible.html" target="_top"><code class="computeroutput"><span class="identifier">is_nothrow_move_constructible</span></code></a> type
triats. There you'll find information about how to make constructor of class
noexcept and how to make a non-copyable class in C++03 and C++98.
</p>
<p>
Performance of <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
will <span class="bold"><strong>greatly improve</strong></span> if value type has noexcept
move constructor and noexcept move assignment.
</p>
<h4>
<a name="circular_buffer.implementation.h6"></a>
<span class="phrase"><a name="circular_buffer.implementation.exceptions_of_move_if_noexcept_t"></a></span><a class="link" href="implementation.html#circular_buffer.implementation.exceptions_of_move_if_noexcept_t">Exceptions
of move_if_noexcept(T&amp;)</a>
</h4>
<p>
Reference documentation of the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
contains notes like "Throws: See Exceptions of <code class="computeroutput"><span class="identifier">move_if_noexcept</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;)</span></code>".
That note means the following: <code class="computeroutput"><span class="identifier">move_if_noexcept</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span>
<span class="identifier">value</span><span class="special">)</span></code>
does not throws exceptions at all, but it returns <code class="computeroutput"><span class="identifier">value</span></code>
as rvalue reference only if class <code class="computeroutput"><span class="identifier">T</span></code>
have noexcept move constructor and noexcept move assignment operator; or if
it has no copy constructor. Otherwise <code class="computeroutput"><span class="identifier">move_if_noexcept</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span>
<span class="identifier">value</span><span class="special">)</span></code>
returns <code class="computeroutput"><span class="identifier">value</span></code> as const reference.
</p>
<p>
This leads us to the following situation:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
If <code class="computeroutput"><span class="identifier">value</span></code> has a noexcept
move constructor and noexcept move assignment operator, then no exceptions
will be thrown at all.
</li>
<li class="listitem">
If <code class="computeroutput"><span class="identifier">value</span></code> has a throwing
move constructor and some copy constructor, then method may throw exceptions
of copy constructor.
</li>
<li class="listitem">
If <code class="computeroutput"><span class="identifier">value</span></code> has no copy constructor,
then method may throw exceptions of move constructor.
</li>
</ul></div>
<p>
<code class="computeroutput"><span class="identifier">move_if_noexcept</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;)</span></code> uses
<a href="../../../libs/move/index.html" target="_top">Boost.Move</a>, <a href="../../../libs/type_traits/doc/html/boost_typetraits/reference/is_copy_constructible.html" target="_top"><code class="computeroutput"><span class="identifier">is_copy_constructible</span></code></a>, <a href="../../../libs/type_traits/doc/html/boost_typetraits/reference/is_nothrow_move_assignable.html" target="_top"><code class="computeroutput"><span class="identifier">is_nothrow_move_assignable</span></code></a> and <a href="../../../libs/type_traits/doc/html/boost_typetraits/reference/is_nothrow_move_constructible.html" target="_top"><code class="computeroutput"><span class="identifier">is_nothrow_move_constructible</span></code></a> type
triats.
</p>
<h4>
<a name="circular_buffer.implementation.h7"></a>
<span class="phrase"><a name="circular_buffer.implementation.caveats"></a></span><a class="link" href="implementation.html#circular_buffer.implementation.caveats">Caveats</a>
</h4>
<p>
The <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> should
not be used for storing pointers to dynamically allocated objects. When a circular
buffer becomes full, further insertion will overwrite the stored pointers -
resulting in a <span class="bold"><strong>memory leak</strong></span>. One recommend
alternative is the use of smart pointers, for example <a href="http://www.boost.org/doc/libs/1_53_0/libs/smart_ptr/smart_ptr.htm" target="_top">Boost
Smart pointers</a>.
</p>
<p>
<a href="http://en.wikipedia.org/wiki/Std::auto_ptr" target="_top">std::auto_ptr</a>
</p>
<div class="caution"><table border="0" summary="Caution">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../doc/src/images/caution.png"></td>
<th align="left">Caution</th>
</tr>
<tr><td align="left" valign="top"><p>
Any container of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span></code> is considered particularly hazardous.
</p></td></tr>
</table></div>
<div class="tip"><table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../doc/src/images/tip.png"></td>
<th align="left">Tip</th>
</tr>
<tr><td align="left" valign="top"><p>
Never create a circular buffer of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span></code>.
Refer to Scott Meyers' excellent book Effective STL for a detailed discussion.
(Meyers S., Effective STL: 50 Specific Ways to Improve Your Use of the Standard
Template Library. Addison-Wesley, 2001.)
</p></td></tr>
</table></div>
<p>
While internals of a <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
are circular, <span class="bold"><strong>iterators are not</strong></span>. Iterators
of a <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> are
only valid for the range <code class="computeroutput"><span class="special">\[</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">end</span><span class="special">()\]</span></code>,
so for example: iterators <code class="computeroutput"><span class="special">(</span><span class="identifier">begin</span><span class="special">()</span> <span class="special">-</span> <span class="number">1</span><span class="special">)</span></code> and <code class="computeroutput"><span class="special">(</span><span class="identifier">end</span><span class="special">()</span> <span class="special">+</span>
<span class="number">1</span><span class="special">)</span></code> are
both invalid.
</p>
<h4>
<a name="circular_buffer.implementation.h8"></a>
<span class="phrase"><a name="circular_buffer.implementation.debug_support"></a></span><a class="link" href="implementation.html#circular_buffer.implementation.debug_support">Debug
Support</a>
</h4>
<p>
In order to help a programmer to avoid and find common bugs, the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> can be enabled to
provide a kind of debug support.
</p>
<p>
When the debugging functionality is enabled, the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
maintains a list of valid iterators. As soon as any element gets destroyed
all iterators pointing to this element are removed from this list and explicitly
invalidated (an invalidation flag is set). The debug support also consists
of many assertions (<code class="computeroutput"><span class="identifier">BOOST_ASSERT</span></code>
macros) which ensure the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
and its iterators are used in the correct manner at runtime. In case an invalid
iterator is used, the assertion will report an error. The connection of explicit
iterator invalidation and assertions makes a very robust debug technique which
catches most of the errors.
</p>
<p>
Moreover, the uninitialized memory allocated by <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
is filled with the value <code class="computeroutput"><span class="number">0xcc</span></code> in
the debug mode. When debugging the code, this can help the programmer to recognize
the initialized memory from the uninitialized. For details refer the source
code <a href="../../../boost/circular_buffer/debug.hpp" target="_top">circular_buffer/debug.hpp</a>.
</p>
<div class="caution"><table border="0" summary="Caution">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../doc/src/images/caution.png"></td>
<th align="left">Caution</th>
</tr>
<tr><td align="left" valign="top"><p>
Since the debugging code makes <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
and its iterators more interconnected, thread safety guarantees of <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> are different when
debug support is enabled. In addition to the container itself, all iterators
tracked by the container (including any copies thereof) must be protected
from concurrent access. In particular, this includes copying, destroying
or obtaining iterators from the container, even if for read-only access.
</p></td></tr>
</table></div>
<p>
The debug support is disabled by default. To enable it, one has to define
<code class="computeroutput"><span class="identifier">BOOST_CB_ENABLE_DEBUG</span></code> macro
with the value of 1 while compiling the code using <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>.
</p>
<h4>
<a name="circular_buffer.implementation.h9"></a>
<span class="phrase"><a name="circular_buffer.implementation.compatibility_with_interprocess_"></a></span><a class="link" href="implementation.html#circular_buffer.implementation.compatibility_with_interprocess_">Compatibility
with Interprocess library</a>
</h4>
<p>
The <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code> is
compatible with the <a href="../../../libs/interprocess/index.html" target="_top">Boost.Interprocess</a>
library used for interprocess communication. Considering that the circular_buffer's
debug support relies on 'raw' pointers (which is not permitted by the Interprocess
library) the code has to compiled with debug support disabled (i.e. with <code class="computeroutput"><span class="identifier">BOOST_CB_ENABLE_DEBUG</span></code> macro not defined or
defined to 0). Not doing that will cause the compilation to fail.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="rationale.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="examples.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,117 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Rationale</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="example.html" title="Circular_buffer example">
<link rel="next" href="implementation.html" title="Implementation">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="example.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="implementation.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="circular_buffer.rationale"></a><a class="link" href="rationale.html" title="Rationale">Rationale</a>
</h2></div></div></div>
<p>
The basic motivation behind the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
was to create a container which would <span class="bold"><strong>work seamlessly
with STL</strong></span>.
</p>
<p>
Additionally, the design of the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
was guided by the following principles:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Maximum <span class="emphasis"><em>efficiency</em></span> for envisaged applications.
</li>
<li class="listitem">
Suitable for <span class="emphasis"><em>general purpose use</em></span>.
</li>
<li class="listitem">
The behaviour of the buffer as <span class="emphasis"><em>intuitive</em></span> as possible.
</li>
<li class="listitem">
Suitable for <span class="emphasis"><em>specialization</em></span> by means of adaptors.
(The <code class="computeroutput"><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>
is such an example of the adaptor.)
</li>
<li class="listitem">
Easy to <span class="emphasis"><em>debug</em></span>. (See Debug Support for details.)
</li>
</ul></div>
<p>
In order to achieve maximum efficiency, the <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
and <code class="computeroutput"><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized">circular_buffer_space_optimized</a></code>
store their elements in a <span class="bold"><strong>contiguous region of memory</strong></span>,
which then enables:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Use of fixed memory and no implicit or unexpected memory allocation.
</li>
<li class="listitem">
Fast constant-time insertion and removal of elements from the front and
back.
</li>
<li class="listitem">
Fast constant-time random access of elements.
</li>
<li class="listitem">
Suitability for real-time and performance critical applications.
</li>
</ul></div>
<p>
Possible applications of the circular buffer include:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Storage of the <span class="emphasis"><em>most recently received samples</em></span>, overwriting
the oldest as new samples arrive.
</li>
<li class="listitem">
As an underlying container for a <span class="emphasis"><em>bounded buffer</em></span> (see
the Bounded Buffer example, code at <a href="../../../libs/circular_buffer/example/circular_buffer_bound_example.cpp" target="_top">circular_buffer_bound_example.cpp</a>).
</li>
<li class="listitem">
A kind of <span class="emphasis"><em>cache</em></span> storing a specified number of last
inserted elements.
</li>
<li class="listitem">
Efficient fixed capacity <span class="emphasis"><em>FIFO (First In, First Out)</em></span>,
</li>
<li class="listitem">
Efficient fixed capacity <span class="emphasis"><em>LIFO (Last In, First Out)</em></span>
queue which removes the oldest (inserted as first) elements when full.
</li>
</ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="example.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="implementation.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,120 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Release Notes</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="tickets.html" title="Trac Tickets">
<link rel="next" href="acknowledgements.html" title="Acknowledgements">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tickets.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="circular_buffer.release"></a><a class="link" href="release.html" title="Release Notes">Release Notes</a>
</h2></div></div></div>
<h5>
<a name="circular_buffer.release.h0"></a>
<span class="phrase"><a name="circular_buffer.release.boost_1_56"></a></span><a class="link" href="release.html#circular_buffer.release.boost_1_56">Boost
1.56</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
C++11 allocator model support implemented by Glen Fernandes.
</li></ul></div>
<h5>
<a name="circular_buffer.release.h1"></a>
<span class="phrase"><a name="circular_buffer.release.boost_1_55"></a></span><a class="link" href="release.html#circular_buffer.release.boost_1_55">Boost
1.55</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Documentation refactored by Paul A. Bristow using Quickbook, Doxygen and
Autoindexing.
</li>
<li class="listitem">
Rvalue references emulation added by Antony Polukhin using Boost.Move.
</li>
</ul></div>
<h5>
<a name="circular_buffer.release.h2"></a>
<span class="phrase"><a name="circular_buffer.release.boost_1_42"></a></span><a class="link" href="release.html#circular_buffer.release.boost_1_42">Boost
1.42</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Added methods erase_begin(size_type) and erase_end(size_type) with constant
complexity for such types of stored elements which do not need an explicit
destruction e.g. int or double.
</li>
<li class="listitem">
Similarly changed implementation of the clear() method and the destructor
so their complexity is now constant for such types of stored elements which
do not require an explicit destruction (the complexity for other types
remains linear).
</li>
</ul></div>
<h5>
<a name="circular_buffer.release.h3"></a>
<span class="phrase"><a name="circular_buffer.release.boost_1_37"></a></span><a class="link" href="release.html#circular_buffer.release.boost_1_37">Boost
1.37</a>
</h5>
<pre class="programlisting"><span class="special">*</span><span class="identifier">Added</span> <span class="keyword">new</span> <span class="identifier">methods</span> <span class="identifier">is_linearized</span><span class="special">()</span> <span class="keyword">and</span> <span class="identifier">rotate</span><span class="special">(</span><span class="identifier">const_iterator</span><span class="special">).</span>
</pre>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Fixed bugs: <a href="https://svn.boost.org/trac/boost/ticket/1987" target="_top">#1987</a>
Patch to make circular_buffer.hpp #includes absolute. <a href="https://svn.boost.org/trac/boost/ticket/1852" target="_top">#1852</a>
Copy constructor does not copy capacity.
</li></ul></div>
<h5>
<a name="circular_buffer.release.h4"></a>
<span class="phrase"><a name="circular_buffer.release.boost_1_36"></a></span><a class="link" href="release.html#circular_buffer.release.boost_1_36">Boost
1.36</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
Changed behaviour of the circular_buffer(const allocator_type&amp;) constructor.
Since this version the constructor does not allocate any memory and both
capacity and size are set to zero.
</li>
<li class="listitem">
Fixed bug: <a href="https://svn.boost.org/trac/boost/ticket/191" target="_top">#1919</a>
Default constructed circular buffer throws std::bad_alloc.
</li>
</ul></div>
<h5>
<a name="circular_buffer.release.h5"></a>
<span class="phrase"><a name="circular_buffer.release.boost_1_35"></a></span><a class="link" href="release.html#circular_buffer.release.boost_1_35">Boost
1.35</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
Initial release.
</li></ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tickets.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,645 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Index</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized">
<link rel="next" href="../container.html" title="Chapter 9. Boost.Container">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../boost/circular_idm45951347095360.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../container.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.3.9.17"></a>Index</h2></div></div></div>
<p><a class="link" href="s14.html#idx_id_0">A</a> <a class="link" href="s14.html#idx_id_1">B</a> <a class="link" href="s14.html#idx_id_2">C</a> <a class="link" href="s14.html#idx_id_3">D</a> <a class="link" href="s14.html#idx_id_4">E</a> <a class="link" href="s14.html#idx_id_5">F</a> <a class="link" href="s14.html#idx_id_6">H</a> <a class="link" href="s14.html#idx_id_7">I</a> <a class="link" href="s14.html#idx_id_8">L</a> <a class="link" href="s14.html#idx_id_9">M</a> <a class="link" href="s14.html#idx_id_10">P</a> <a class="link" href="s14.html#idx_id_11">R</a> <a class="link" href="s14.html#idx_id_12">S</a> <a class="link" href="s14.html#idx_id_13">T</a> <a class="link" href="s14.html#idx_id_14">V</a> <a class="link" href="s14.html#idx_id_15">W</a></p>
<div class="variablelist"><dl class="variablelist">
<dt>
<a name="idx_id_0"></a><span class="term">A</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">allocator_type</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">array</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">array_range</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">assign</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_1"></a><span class="term">B</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">begin</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">BOOST_CB_ENABLE_DEBUG</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost_circular_buffer_c___reference.html#header.boost.circular_buffer_hpp" title="Header &lt;boost/circular_buffer.hpp&gt;"><span class="index-entry-level-1">Header &lt; boost/circular_buffer.hpp &gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">Implementation </span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../BOOST_CB_ENABLE_DEBUG.html" title="Macro BOOST_CB_ENABLE_DEBUG"><span class="index-entry-level-1">Macro BOOST_CB_ENABLE_DEBUG</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">bounded_buffer</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">More Examples</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">buffer</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">Implementation </span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../circular_buffer.html#circular_buffer.intro" title="Introduction"><span class="index-entry-level-1">Introduction</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="rationale.html" title="Rationale"><span class="index-entry-level-1">Rationale</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_2"></a><span class="term">C</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">capacity</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">capacity_control</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">capacity_type</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">cb</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="example.html" title="Circular_buffer example"><span class="index-entry-level-1">Circular_buffer example</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">Implementation </span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">More Examples</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">circular_buffer</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="release.html" title="Release Notes"><span class="index-entry-level-1">Release Notes</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Circular_buffer example</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="example.html" title="Circular_buffer example"><span class="index-entry-level-1">cb</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">circular_buffer_space_optimized</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Class template circular_buffer</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">allocator_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">array</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">array_range</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">assign</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">begin</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">capacity</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">capacity_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Constant</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">const_array_range</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">const_iterator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">const_pointer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">const_reference</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">const_reverse_iterator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">destructruction</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">difference_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">element</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">end</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">erase_begin</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">erase_end</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">exhausted</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">insert</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">invalid</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">it</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">iterator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Linear</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">linearize</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">param_value_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">point</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">pointer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">pop_back</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">postcondition</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">push_front</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">range</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">reference</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">resize</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">reverse_iterator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">rinsert</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">rotate</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">rvalue_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">size_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">this_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">value_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">write</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Class template circular_buffer_space_optimized</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">allocator_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">array_range</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">assign</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">begin</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">capacity</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">capacity_control</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">capacity_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">circular_buffer_space_optimized</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Constant</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">const_array_range</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">const_iterator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">const_pointer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">const_reference</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">const_reverse_iterator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">difference_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">end</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">exhausted</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">insert</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">iterator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Linear</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">param_value_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">pointer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">pop_back</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">push_front</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">reference</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">resize</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">reverse_iterator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">rinsert</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">rvalue_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">size_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">value_type</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Constant</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/swap_idm45951347114400.html" title="Function template swap"><span class="index-entry-level-1">Function template swap</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">const_array_range</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">const_iterator</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">const_pointer</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">const_reference</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">const_reverse_iterator</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">consumer</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">Implementation </span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">container_type</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">More Examples</span></a></p></li></ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_3"></a><span class="term">D</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">destructruction</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">difference_type</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_4"></a><span class="term">E</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">element</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">Implementation </span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">end</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">erase_begin</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="release.html" title="Release Notes"><span class="index-entry-level-1">Release Notes</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">erase_end</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="release.html" title="Release Notes"><span class="index-entry-level-1">Release Notes</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">exhausted</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_5"></a><span class="term">F</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Function template operator!=</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347173664.html" title="Function template operator!="><span class="index-entry-level-1">Linear</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Function template operator&gt;</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347158864.html" title="Function template operator&gt;"><span class="index-entry-level-1">Linear</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Function template operator&gt;=</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347129232.html" title="Function template operator&gt;="><span class="index-entry-level-1">Linear</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Function template operator&lt;</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347187488.html" title="Function template operator&lt;"><span class="index-entry-level-1">Linear</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Function template operator&lt;=</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347144048.html" title="Function template operator&lt;="><span class="index-entry-level-1">Linear</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Function template operator==</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347201408.html" title="Function template operator=="><span class="index-entry-level-1">Linear</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Function template swap</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/swap_idm45951347114400.html" title="Function template swap"><span class="index-entry-level-1">Constant</span></a></p></li></ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_6"></a><span class="term">H</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Header &lt; boost/circular_buffer.hpp &gt;</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost_circular_buffer_c___reference.html#header.boost.circular_buffer_hpp" title="Header &lt;boost/circular_buffer.hpp&gt;"><span class="index-entry-level-1">BOOST_CB_ENABLE_DEBUG</span></a></p></li></ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_7"></a><span class="term">I</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Implementation </span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">BOOST_CB_ENABLE_DEBUG</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">cb</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">consumer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">element</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">main</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">pop_back</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">insert</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Introduction</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../circular_buffer.html#circular_buffer.intro" title="Introduction"><span class="index-entry-level-1">buffer</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">invalid</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">it</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">iterator</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_8"></a><span class="term">L</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Linear</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347173664.html" title="Function template operator!="><span class="index-entry-level-1">Function template operator!=</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347158864.html" title="Function template operator&gt;"><span class="index-entry-level-1">Function template operator&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347129232.html" title="Function template operator&gt;="><span class="index-entry-level-1">Function template operator&gt;=</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347187488.html" title="Function template operator&lt;"><span class="index-entry-level-1">Function template operator&lt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347144048.html" title="Function template operator&lt;="><span class="index-entry-level-1">Function template operator&lt;=</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/operator_idm45951347201408.html" title="Function template operator=="><span class="index-entry-level-1">Function template operator==</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">linearize</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="tickets.html" title="Trac Tickets"><span class="index-entry-level-1">Trac Tickets</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">lock</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">More Examples</span></a></p></li></ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_9"></a><span class="term">M</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Macro BOOST_CB_ENABLE_DEBUG</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../BOOST_CB_ENABLE_DEBUG.html" title="Macro BOOST_CB_ENABLE_DEBUG"><span class="index-entry-level-1">BOOST_CB_ENABLE_DEBUG</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">main</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">Implementation </span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">More Examples</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">More Examples</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">bounded_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">cb</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">container_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">lock</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">main</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">param_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">pop_back</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">push_front</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">size_type</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">value_type</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_10"></a><span class="term">P</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">param_type</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">More Examples</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">param_value_type</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">point</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">pointer</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">pop_back</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="implementation.html" title="Implementation"><span class="index-entry-level-1">Implementation </span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">More Examples</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">postcondition</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">push_front</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">More Examples</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_11"></a><span class="term">R</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">range</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Rationale</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="rationale.html" title="Rationale"><span class="index-entry-level-1">buffer</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">reference</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Release Notes</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="release.html" title="Release Notes"><span class="index-entry-level-1">circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="release.html" title="Release Notes"><span class="index-entry-level-1">erase_begin</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="release.html" title="Release Notes"><span class="index-entry-level-1">erase_end</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="release.html" title="Release Notes"><span class="index-entry-level-1">rotate</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">resize</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">reverse_iterator</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">rinsert</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">rotate</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="release.html" title="Release Notes"><span class="index-entry-level-1">Release Notes</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">rvalue_type</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_12"></a><span class="term">S</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">size_type</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">More Examples</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_13"></a><span class="term">T</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">this_type</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">Trac Tickets</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="tickets.html" title="Trac Tickets"><span class="index-entry-level-1">linearize</span></a></p></li></ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_14"></a><span class="term">V</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">value_type</span></p>
<div class="index"><ul class="index" style="list-style-type: none; ">
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_idm45951347095360.html" title="Class template circular_buffer_space_optimized"><span class="index-entry-level-1">Class template circular_buffer_space_optimized</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="examples.html" title="More Examples"><span class="index-entry-level-1">More Examples</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_15"></a><span class="term">W</span>
</dt>
<dd><div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">write</span></p>
<div class="index"><ul class="index" style="list-style-type: none; "><li class="listitem" style="list-style-type: none"><p><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer"><span class="index-entry-level-1">Class template circular_buffer</span></a></p></li></ul></div>
</li></ul></div></dd>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../boost/circular_idm45951347095360.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../container.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,103 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Template Parameters</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="concepts.html" title="Modelled Concepts">
<link rel="next" href="tickets.html" title="Trac Tickets">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="concepts.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tickets.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="circular_buffer.template_params"></a><a class="link" href="template_params.html" title="Template Parameters">Template Parameters</a>
</h2></div></div></div>
<div class="table">
<a name="circular_buffer.template_params.templ"></a><p class="title"><b>Table 8.1. Template parameter requirements</b></p>
<div class="table-contents"><table class="table" summary="Template parameter requirements">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
parameter
</p>
</th>
<th>
<p>
Requirements
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
T
</p>
</td>
<td>
<p>
The type of the elements stored in the circular_buffer. The T has
to be <a href="../../../libs/utility/Assignable.html" target="_top">Assignable</a>
and <a href="../../../libs/utility/CopyConstructible.html" target="_top">CopyConstructible</a>.
Moreover T has to be <a href="https://www.boost.org/sgi/stl/DefaultConstructible.html" target="_top">DefaultConstructible</a>
if supplied as a default parameter when invoking some of the circular_buffer's
methods, e.g. <code class="computeroutput"><span class="identifier">insert</span><span class="special">(</span><span class="identifier">iterator</span>
<span class="identifier">pos</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">value_type</span><span class="special">&amp;</span> <span class="identifier">item</span>
<span class="special">=</span> <span class="identifier">value_type</span><span class="special">())</span></code>. And <a href="https://www.boost.org/sgi/stl/EqualityComparable.html" target="_top">EqualityComparable</a>
and/or <a href="../../../libs/utility/LessThanComparable.html" target="_top">LessThanComparable</a>
if the circular_buffer will be compared with another container.
</p>
</td>
</tr>
<tr>
<td>
<p>
Alloc
</p>
</td>
<td>
<p>
The allocator type used for all internal memory management. The Alloc
has to meet the allocator requirements imposed by STL.
</p>
</td>
</tr>
</tbody>
</table></div>
</div>
<br class="table-break">
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="concepts.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tickets.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,106 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Trac Tickets</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="template_params.html" title="Template Parameters">
<link rel="next" href="release.html" title="Release Notes">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="template_params.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="release.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="circular_buffer.tickets"></a><a class="link" href="tickets.html" title="Trac Tickets">Trac Tickets</a>
</h2></div></div></div>
<p>
Report and view bugs and features by adding a ticket at <a href="https://svn.boost.org/trac/boost" target="_top">Boost.Trac</a>.
</p>
<p>
Existing open tickets for this library alone can be viewed <a href="https://svn.boost.org/trac/boost/query?status=assigned&amp;status=new&amp;status=reopened&amp;component=circular_buffer&amp;col=id&amp;col=summary&amp;col=status&amp;col=owner&amp;col=type&amp;col=milestone&amp;order=priority" target="_top">here</a>.
Existing tickets for this library - including closed ones - can be viewed
<a href="https://svn.boost.org/trac/boost/query?status=assigned&amp;status=closed&amp;status=new&amp;status=reopened&amp;component=circular_buffer&amp;col=id&amp;col=summary&amp;col=status&amp;col=owner&amp;col=type&amp;col=milestone&amp;order=priority" target="_top">here</a>.
</p>
<p>
Type: Bugs
</p>
<p>
<a href="https://svn.boost.org/trac/boost/ticket/4100" target="_top">#4100</a> Some
boost classes have sizeof that depends on NDEBUG.
</p>
<p>
<a href="https://svn.boost.org/trac/boost/ticket/5362" target="_top">#5362</a> circular_buffer
does not compile with BOOST_NO_EXCEPTIONS.
</p>
<p>
<a href="https://svn.boost.org/trac/boost/ticket/6277" target="_top">#6277</a> Checked
iterators are not threadsafe.
</p>
<p>
<a href="https://svn.boost.org/trac/boost/ticket/6747" target="_top">#6747</a> Circular_Buffer
/ Bounded_Buffer inside Template class problem.
</p>
<p>
<a href="https://svn.boost.org/trac/boost/ticket/7025" target="_top">#7025</a> circular
buffer reports warning: " type qualifiers ignored on function return type"
while compile.
</p>
<p>
<a href="https://svn.boost.org/trac/boost/ticket/7950" target="_top">#7950</a> Eliminate
W4-warnings under VS2005.
</p>
<p>
<a href="https://svn.boost.org/trac/boost/ticket/8012" target="_top">#8012</a> Inconsistency
in <code class="computeroutput"><span class="identifier">linearize</span><span class="special">()</span></code>.
</p>
<p>
<a href="https://svn.boost.org/trac/boost/ticket/8438" target="_top">#8438</a> <code class="computeroutput"><span class="identifier">vector</span></code> &amp; <code class="computeroutput"><a class="link" href="../boost/circular_buffer.html" title="Class template circular_buffer">circular_buffer</a></code>
storage misbehave when using compiler optimizations.
</p>
<p>
Type: Feature Requests
</p>
<p>
<a href="https://svn.boost.org/trac/boost/ticket/5511" target="_top">#5511</a> Documentation
needs some improvement.
</p>
<p>
<a href="https://svn.boost.org/trac/boost/ticket/7888" target="_top">#7888</a> circular_buffer
should support move semantics.
</p>
<p>
Type: Patches
</p>
<p>
<a href="https://svn.boost.org/trac/boost/ticket/8032" target="_top">#8032</a> Warning
fixes in circular_buffer.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="template_params.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="release.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,67 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Documentation Version Info</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../circular_buffer.html" title="Chapter 8. Boost.Circular Buffer">
<link rel="prev" href="acknowledgements.html" title="Acknowledgements">
<link rel="next" href="../boost_circular_buffer_c___reference.html" title="Boost.Circular_buffer C++ Reference">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="acknowledgements.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../boost_circular_buffer_c___reference.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="circular_buffer.version_id"></a><a class="link" href="version_id.html" title="Documentation Version Info">Documentation Version Info</a>
</h2></div></div></div>
<p>
Last edit to Quickbook file circular_buffer.qbk was at 04:33:30 PM on 2021-Apr-13.
</p>
<div class="tip"><table border="0" summary="Tip">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../doc/src/images/tip.png"></td>
<th align="left">Tip</th>
</tr>
<tr><td align="left" valign="top"><p>
This should appear on the pdf version (but may be redundant on a html version
where the last edit date is on the first (home) page).
</p></td></tr>
</table></div>
<div class="warning"><table border="0" summary="Warning">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../doc/src/images/warning.png"></td>
<th align="left">Warning</th>
</tr>
<tr><td align="left" valign="top"><p>
Home page "Last revised" is GMT, not local time. Last edit date
is local time.
</p></td></tr>
</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2013 Jan Gaspar<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="acknowledgements.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../circular_buffer.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../boost_circular_buffer_c___reference.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>