Boost.RangeEx merged into Boost.Range

[SVN r60897]
This commit is contained in:
Neil Groves
2010-03-28 16:08:35 +00:00
parent 1461479a17
commit b0d1db7c2e
471 changed files with 48610 additions and 2065 deletions

View File

@@ -0,0 +1,305 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Bidirectional Range</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
<link rel="up" href="../concepts.html" title="Range Concepts">
<link rel="prev" href="forward_range.html" title="Forward Range">
<link rel="next" href="random_access_range.html" title="Random Access Range">
</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="../../../../../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="forward_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="random_access_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Bidirectional Range">
<div class="titlepage"><div><div><h3 class="title">
<a name="range.concepts.bidirectional_range"></a><a class="link" href="bidirectional_range.html" title="Bidirectional Range">Bidirectional Range</a>
</h3></div></div></div>
<a name="range.concepts.bidirectional_range.notation"></a><h5>
<a name="id3168757"></a>
<a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.notation">Notation</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr></tr></thead>
<tbody>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">X</span></code>
</p>
</td>
<td>
<p>
A type that is a model of <a class="link" href="bidirectional_range.html" title="Bidirectional Range">Bidirectional
Range</a>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">a</span></code>
</p>
</td>
<td>
<p>
Object of type X.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="range.concepts.bidirectional_range.description"></a><h5>
<a name="id3168855"></a>
<a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.description">Description</a>
</h5>
<p>
This concept provides access to iterators that traverse in both directions
(forward and reverse). The <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> iterator must meet all of the requirements
of <a href="../../../../libs/iterator/doc/new-iter-concepts.html#bidirectional-traversal-iterators-lib-bidirectional-traversal-iterators" target="_top">Bidirectional
Traversal Iterator</a>.
</p>
<a name="range.concepts.bidirectional_range.refinement_of"></a><h5>
<a name="id3168920"></a>
<a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.refinement_of">Refinement
of</a>
</h5>
<p>
<a class="link" href="forward_range.html" title="Forward Range">Forward Range</a>
</p>
<a name="range.concepts.bidirectional_range.associated_types"></a><h5>
<a name="id3168949"></a>
<a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.associated_types">Associated
types</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr></tr></thead>
<tbody>
<tr>
<td>
<p>
Reverse Iterator type
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
<td>
<p>
The type of iterator used to iterate through a Range's elements
in reverse order. The iterator's value type is expected to be the
Range's value type. A conversion from the reverse iterator type
to the const reverse iterator type must exist.
</p>
</td>
</tr>
<tr>
<td>
<p>
Const reverse iterator type
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
<td>
<p>
A type of reverse iterator that may be used to examine, but not
to modify, a Range's elements.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="range.concepts.bidirectional_range.valid_expressions"></a><h5>
<a name="id3169115"></a>
<a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.valid_expressions">Valid
expressions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Return type
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Beginning of range
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> if <code class="computeroutput"><span class="identifier">a</span></code>
is mutable <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
<span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> otherwise.
</p>
</td>
<td>
<p>
Equivalent to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">))</span></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
End of range
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rend</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> if <code class="computeroutput"><span class="identifier">a</span></code>
is mutable, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
<span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> otherwise.
</p>
</td>
<td>
<p>
Equivalent to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_reverse_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">))</span></code>.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="range.concepts.bidirectional_range.complexity_guarantees"></a><h5>
<a name="id3169594"></a>
<a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.complexity_guarantees">Complexity
guarantees</a>
</h5>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> has
the same complexity as <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> and
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rend</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> has the same complexity as <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> from
<a class="link" href="forward_range.html" title="Forward Range">Forward Range</a>.
</p>
<a name="range.concepts.bidirectional_range.invariants"></a><h5>
<a name="id3169745"></a>
<a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.invariants">Invariants</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr></tr></thead>
<tbody>
<tr>
<td>
<p>
Valid reverse range
</p>
</td>
<td>
<p>
For any Bidirectional Range a, <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">a</span><span class="special">),</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rend</span><span class="special">(</span><span class="identifier">a</span><span class="special">))</span></code>
is a valid range, that is, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rend</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> is reachable from <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
in a finite number of increments.
</p>
</td>
</tr>
<tr>
<td>
<p>
Completeness
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">An</span> <span class="identifier">algorithm</span>
<span class="identifier">that</span> <span class="identifier">iterates</span>
<span class="identifier">through</span> <span class="identifier">the</span>
<span class="identifier">range</span> </code>[boost::rbegin(a),boost::rend(a))<code class="computeroutput">
<span class="identifier">will</span> <span class="identifier">pass</span>
<span class="identifier">through</span> <span class="identifier">every</span>
<span class="identifier">element</span> <span class="identifier">of</span>
</code>a`.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="range.concepts.bidirectional_range.see_also"></a><h5>
<a name="id3170015"></a>
<a class="link" href="bidirectional_range.html#range.concepts.bidirectional_range.see_also">See also</a>
</h5>
<p>
<a class="link" href="../reference/semantics/metafunctions.html" title="Metafunctions">Implementation of
metafunctions</a>
</p>
<p>
<a class="link" href="../reference/semantics/functions.html" title="Functions">Implementation of functions</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 &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<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="forward_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="random_access_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,108 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Concept Checking</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
<link rel="up" href="../concepts.html" title="Range Concepts">
<link rel="prev" href="random_access_range.html" title="Random Access Range">
<link rel="next" href="../reference.html" title="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="../../../../../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="random_access_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Concept Checking">
<div class="titlepage"><div><div><h3 class="title">
<a name="range.concepts.concept_checking"></a><a class="link" href="concept_checking.html" title="Concept Checking">Concept Checking</a>
</h3></div></div></div>
<p>
Each of the range concepts has a corresponding concept checking class in
the file <a href="../../../../boost/range/concepts.hpp" target="_top"><code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">range</span><span class="special">/</span><span class="identifier">concepts</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code></a>.
These classes may be used in conjunction with the <a href="../../../../libs/concept_check/index.html" target="_top">Boost
Concept Check library</a> to ensure that the type of a template parameter
is compatible with a range concept. If not, a meaningful compile time error
is generated. Checks are provided for the range concepts related to iterator
traversal categories. For example, the following line checks that the type
<code class="computeroutput"><span class="identifier">T</span></code> models the <a class="link" href="forward_range.html" title="Forward Range">Forward
Range</a> concept.
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span> <span class="identifier">ForwardRangeConcept</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">));</span>
</pre>
<p>
</p>
<p>
An additional concept check is required for the value access property of
the range based on the range's iterator type. For example to check for a
ForwardReadableRange, the following code is required.
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span> <span class="identifier">ForwardRangeConcept</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span> <span class="special">));</span>
<span class="identifier">BOOST_CONCEPT_ASSERT</span><span class="special">((</span> <span class="identifier">ReadableIteratorConcept</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">type</span><span class="special">&gt;</span> <span class="special">));</span>
</pre>
<p>
</p>
<p>
The following range concept checking classes are provided.
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Class SinglePassRangeConcept checks for <a class="link" href="single_pass_range.html" title="Single Pass Range">Single
Pass Range</a>
</li>
<li class="listitem">
Class ForwardRangeConcept checks for <a class="link" href="forward_range.html" title="Forward Range">Forward
Range</a>
</li>
<li class="listitem">
Class BidirectionalRangeConcept checks for <a class="link" href="bidirectional_range.html" title="Bidirectional Range">Bidirectional
Range</a>
</li>
<li class="listitem">
Class RandomAccessRangeConcept checks for <a class="link" href="random_access_range.html" title="Random Access Range">Random
Access Range</a>
</li>
</ul></div>
<a name="range.concepts.concept_checking.see_also"></a><h5>
<a name="id3171025"></a>
<a class="link" href="concept_checking.html#range.concepts.concept_checking.see_also">See also</a>
</h5>
<p>
<a class="link" href="../style_guide.html" title="Terminology and style guidelines">Range Terminology and style guidelines</a>
</p>
<p>
<a href="../../../../libs/iterator/doc/iterator_concepts.html" target="_top">Iterator concepts</a>
</p>
<p>
<a href="../../../../libs/concept_check/index.html" target="_top">Boost Concept Check library</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 &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<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="random_access_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,159 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Forward Range</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
<link rel="up" href="../concepts.html" title="Range Concepts">
<link rel="prev" href="single_pass_range.html" title="Single Pass Range">
<link rel="next" href="bidirectional_range.html" title="Bidirectional Range">
</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="../../../../../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="single_pass_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bidirectional_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Forward Range">
<div class="titlepage"><div><div><h3 class="title">
<a name="range.concepts.forward_range"></a><a class="link" href="forward_range.html" title="Forward Range">Forward Range</a>
</h3></div></div></div>
<a name="range.concepts.forward_range.notation"></a><h5>
<a name="id3168350"></a>
<a class="link" href="forward_range.html#range.concepts.forward_range.notation">Notation</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr></tr></thead>
<tbody>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">X</span></code>
</p>
</td>
<td>
<p>
A type that is a model of <a class="link" href="forward_range.html" title="Forward Range">Forward
Range</a>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">a</span></code>
</p>
</td>
<td>
<p>
Object of type X.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="range.concepts.forward_range.description"></a><h5>
<a name="id3168446"></a>
<a class="link" href="forward_range.html#range.concepts.forward_range.description">Description</a>
</h5>
<p>
A range <code class="computeroutput"><span class="identifier">X</span></code> where <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is a model of <a href="../../../../libs/iterator/doc/new-iter-concepts.html#forward-traversal-iterators-lib-forward-traversal-iterators" target="_top">Forward
Traversal Iterator</a>.
</p>
<a name="range.concepts.forward_range.refinement_of"></a><h5>
<a name="id3168518"></a>
<a class="link" href="forward_range.html#range.concepts.forward_range.refinement_of">Refinement of</a>
</h5>
<p>
<a class="link" href="single_pass_range.html" title="Single Pass Range">Single Pass Range</a>
</p>
<a name="range.concepts.forward_range.associated_types"></a><h5>
<a name="id3168547"></a>
<a class="link" href="forward_range.html#range.concepts.forward_range.associated_types">Associated
types</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr></tr></thead>
<tbody>
<tr>
<td>
<p>
Distance type
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_difference</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
<td>
<p>
A signed integral type used to represent the distance between two
of the Range's iterators. This type must be the same as the iterator's
distance type.
</p>
</td>
</tr>
<tr>
<td>
<p>
Size type
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_size</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
<td>
<p>
An unsigned integral type that can represent any nonnegative value
of the Range's distance type.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="range.concepts.forward_range.see_also"></a><h5>
<a name="id3168704"></a>
<a class="link" href="forward_range.html#range.concepts.forward_range.see_also">See also</a>
</h5>
<p>
<a class="link" href="../reference/semantics/metafunctions.html" title="Metafunctions">Implementation of
metafunctions</a>
</p>
<p>
<a class="link" href="../reference/semantics/functions.html" title="Functions">Implementation of functions</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 &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<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="single_pass_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="bidirectional_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,79 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Overview</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
<link rel="up" href="../concepts.html" title="Range Concepts">
<link rel="prev" href="../concepts.html" title="Range Concepts">
<link rel="next" href="single_pass_range.html" title="Single Pass Range">
</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="../../../../../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/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="single_pass_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Overview">
<div class="titlepage"><div><div><h3 class="title">
<a name="range.concepts.overview"></a><a class="link" href="overview.html" title="Overview">Overview</a>
</h3></div></div></div>
<p>
A Range is a <span class="bold"><strong><span class="emphasis"><em>concept</em></span></strong></span>
similar to the STL <a href="http://www.sgi.com/Technology/STL/Container.html" target="_top">Container</a>
concept. A Range provides iterators for accessing a half-open range <code class="computeroutput"><span class="special">[</span><span class="identifier">first</span><span class="special">,</span><span class="identifier">one_past_last</span><span class="special">)</span></code> of elements and provides information about
the number of elements in the Range. However, a Range has fewer requirements
than a Container.
</p>
<p>
The motivation for the Range concept is that there are many useful Container-like
types that do not meet the full requirements of Container, and many algorithms
that can be written with this reduced set of requirements. In particular,
a Range does not necessarily
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
own the elements that can be accessed through it,
</li>
<li class="listitem">
have copy semantics,
</li>
</ul></div>
<p>
Because of the second requirement, a Range object must be passed by (const
or non-const) reference in generic code.
</p>
<p>
The operations that can be performed on a Range is dependent on the <a href="../../../../iterator/doc/new-iter-concepts.html#iterator-traversal-concepts-lib-iterator-traversal" target="_top">traversal
category</a> of the underlying iterator type. Therefore the range concepts
are named to reflect which traversal category its iterators support. See
also terminology and style guidelines. for more information about naming
of ranges.
</p>
<p>
The concepts described below specifies associated types as <a href="../../../../libs/mpl/doc/refmanual/metafunction.html" target="_top">metafunctions</a>
and all functions as free-standing functions to allow for a layer of indirection.
</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 &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<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/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="single_pass_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,187 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Random Access Range</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
<link rel="up" href="../concepts.html" title="Range Concepts">
<link rel="prev" href="bidirectional_range.html" title="Bidirectional Range">
<link rel="next" href="concept_checking.html" title="Concept Checking">
</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="../../../../../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="bidirectional_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concept_checking.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Random Access Range">
<div class="titlepage"><div><div><h3 class="title">
<a name="range.concepts.random_access_range"></a><a class="link" href="random_access_range.html" title="Random Access Range">Random Access Range</a>
</h3></div></div></div>
<a name="range.concepts.random_access_range.description"></a><h5>
<a name="id3170068"></a>
<a class="link" href="random_access_range.html#range.concepts.random_access_range.description">Description</a>
</h5>
<p>
A range <code class="computeroutput"><span class="identifier">X</span></code> where <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is a model of <a href="../../../../libs/iterator/doc/new-iter-concepts.html#random-access-traversal-iterators-lib-random-access-traversal-iterators" target="_top">Random
Access Traversal Iterator</a>.
</p>
<a name="range.concepts.random_access_range.refinement_of"></a><h5>
<a name="id3170140"></a>
<a class="link" href="random_access_range.html#range.concepts.random_access_range.refinement_of">Refinement
of</a>
</h5>
<p>
<a class="link" href="bidirectional_range.html" title="Bidirectional Range">Bidirectional Range</a>
</p>
<a name="range.concepts.random_access_range.valid_expressions"></a><h5>
<a name="id3170168"></a>
<a class="link" href="random_access_range.html#range.concepts.random_access_range.valid_expressions">Valid
expressions</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Return type
</p>
</th>
</tr></thead>
<tbody><tr>
<td>
<p>
Size of range
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_size</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
</tr></tbody>
</table></div>
<a name="range.concepts.random_access_range.expression_semantics"></a><h5>
<a name="id3170315"></a>
<a class="link" href="random_access_range.html#range.concepts.random_access_range.expression_semantics">Expression
semantics</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
<th>
<p>
Postcondition
</p>
</th>
</tr></thead>
<tbody><tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
Returns the size of the Range, that is, its number of elements.
Note <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span>
<span class="special">==</span> <span class="number">0u</span></code>
is equivalent to <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">empty</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>.
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span>
<span class="special">&gt;=</span> <span class="number">0</span></code>
</p>
</td>
</tr></tbody>
</table></div>
<a name="range.concepts.random_access_range.complexity_guarantees"></a><h5>
<a name="id3170541"></a>
<a class="link" href="random_access_range.html#range.concepts.random_access_range.complexity_guarantees">Complexity
guarantees</a>
</h5>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> is completes in amortized constant time.
</p>
<a name="range.concepts.random_access_range.invariants"></a><h5>
<a name="id3170595"></a>
<a class="link" href="random_access_range.html#range.concepts.random_access_range.invariants">Invariants</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr></tr></thead>
<tbody><tr>
<td>
<p>
Range size
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
is equal to the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> - <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>.
</p>
</td>
</tr></tbody>
</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 &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<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="bidirectional_range.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="concept_checking.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,349 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Single Pass Range</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Range 2.0">
<link rel="up" href="../concepts.html" title="Range Concepts">
<link rel="prev" href="overview.html" title="Overview">
<link rel="next" href="forward_range.html" title="Forward Range">
</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="../../../../../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="overview.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="forward_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Single Pass Range">
<div class="titlepage"><div><div><h3 class="title">
<a name="range.concepts.single_pass_range"></a><a class="link" href="single_pass_range.html" title="Single Pass Range">Single Pass Range</a>
</h3></div></div></div>
<a name="range.concepts.single_pass_range.notation"></a><h5>
<a name="id3166972"></a>
<a class="link" href="single_pass_range.html#range.concepts.single_pass_range.notation">Notation</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr></tr></thead>
<tbody>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">X</span></code>
</p>
</td>
<td>
<p>
A type that is a model of <a class="link" href="single_pass_range.html" title="Single Pass Range">Single
Pass Range</a>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">a</span></code>
</p>
</td>
<td>
<p>
Object of type X.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="range.concepts.single_pass_range.description"></a><h5>
<a name="id3167074"></a>
<a class="link" href="single_pass_range.html#range.concepts.single_pass_range.description">Description</a>
</h5>
<p>
A range <code class="computeroutput"><span class="identifier">X</span></code> where <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> is a model of <a href="../../../../libs/iterator/doc/new-iter-concepts.html#singls-pass-iterators-lib-single-pass-iterators" target="_top">Single
Pass Iterator</a>.
</p>
<a name="range.concepts.single_pass_range.associated_types"></a><h5>
<a name="id3167146"></a>
<a class="link" href="single_pass_range.html#range.concepts.single_pass_range.associated_types">Associated
types</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr></tr></thead>
<tbody>
<tr>
<td>
<p>
Iterator type
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
<td>
<p>
The type of iterator used to iterate through a Range's elements.
The iterator's value type is expected to be the Range's value type.
A conversion from the iterator type to the <code class="computeroutput"><span class="keyword">const</span></code>
iterator type must exist.
</p>
</td>
</tr>
<tr>
<td>
<p>
Const iterator type
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
<td>
<p>
A type of iterator that may be used to examine, but not to modify,
a Range's elements.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="range.concepts.single_pass_range.valid_expressions"></a><h5>
<a name="id3167320"></a>
<a class="link" href="single_pass_range.html#range.concepts.single_pass_range.valid_expressions">Valid
expressions</a>
</h5>
<p>
The following expressions must be valid.
</p>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Name
</p>
</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Return type
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
Beginning of range
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> if <code class="computeroutput"><span class="identifier">a</span></code>
is mutable, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
<span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> otherwise
</p>
</td>
</tr>
<tr>
<td>
<p>
End of range
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> if <code class="computeroutput"><span class="identifier">a</span></code>
is mutable, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_iterator</span><span class="special">&lt;</span><span class="keyword">const</span>
<span class="identifier">X</span><span class="special">&gt;::</span><span class="identifier">type</span></code> otherwise
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="range.concepts.single_pass_range.expression_semantics"></a><h5>
<a name="id3167654"></a>
<a class="link" href="single_pass_range.html#range.concepts.single_pass_range.expression_semantics">Expression
semantics</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
<th>
<p>
Postcondition
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
Returns an iterator pointing to the first element in the Range.
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
is either dereferenceable or past-the-end. It is past-the-end if
and only if <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">distance</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span> <span class="special">==</span> <span class="number">0</span></code>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
Returns an iterator pointing one past the last element in the Range.
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
is past-the-end.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="range.concepts.single_pass_range.complexity_guarantees"></a><h5>
<a name="id3167925"></a>
<a class="link" href="single_pass_range.html#range.concepts.single_pass_range.complexity_guarantees">Complexity
guarantees</a>
</h5>
<p>
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> is at most amortized linear time, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> is amortized
constant time. For most practical purposes, one can expect both to be amortized
constant time.
</p>
<a name="range.concepts.single_pass_range.invariants"></a><h5>
<a name="id3168008"></a>
<a class="link" href="single_pass_range.html#range.concepts.single_pass_range.invariants">Invariants</a>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr></tr></thead>
<tbody>
<tr>
<td>
<p>
Valid range
</p>
</td>
<td>
<p>
For any Range <code class="computeroutput"><span class="identifier">a</span></code>,
<code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">),</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">))</span></code> is a valid range, that is, <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code>
is reachable from <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">)</span></code> in a finite number of increments.
</p>
</td>
</tr>
<tr>
<td>
<p>
Completeness
</p>
</td>
<td>
<p>
An algorithm that iterates through the range <code class="computeroutput"><span class="special">[</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">a</span><span class="special">),</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="identifier">a</span><span class="special">))</span></code>
will pass through every element of <code class="computeroutput"><span class="identifier">a</span></code>.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="range.concepts.single_pass_range.see_also"></a><h5>
<a name="id3168279"></a>
<a class="link" href="single_pass_range.html#range.concepts.single_pass_range.see_also">See also</a>
</h5>
<p>
<a class="link" href="../reference/extending.html" title="Extending the library">Extending the library for UDTs</a>
</p>
<p>
<a class="link" href="../reference/semantics/metafunctions.html" title="Metafunctions">Implementation of
metafunctions</a>
</p>
<p>
<a class="link" href="../reference/semantics/functions.html" title="Functions">Implementation of functions</a>
</p>
<p>
<a href="http://www.sgi.com/Technology/STL/Container.html" target="_top">Container</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 &#169; 2003 -2010 Thorsten Ottosen, Neil Groves<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="overview.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="forward_range.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>