Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/mpl/doc/refmanual/iterator-range.html @ 29

Last change on this file since 29 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 8.2 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<!-- Copyright Aleksey Gurtovoy 2006. Distributed under the Boost -->
5<!-- Software License, Version 1.0. (See accompanying -->
6<!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
7<head>
8<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
10<title>The MPL Reference Manual: iterator_range</title>
11<link rel="stylesheet" href="../style.css" type="text/css" />
12</head>
13<body class="docframe refmanual">
14<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./filter-view.html" class="navigation-link">Prev</a>&nbsp;<a href="./joint-view.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./filter-view.html" class="navigation-link">Back</a>&nbsp;<a href="./joint-view.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./views.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
15<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./views.html" class="navigation-link">Views</a> / <a href="./iterator-range.html" class="navigation-link">iterator_range</a></td>
16</tr></table><div class="header-separator"></div>
17<div class="section" id="iterator-range">
18<h1><a class="toc-backref" href="./views.html#id347" name="iterator-range">iterator_range</a></h1>
19<div class="section" id="iterator-synopsis">
20<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
21<pre class="literal-block">
22template&lt;
23      typename First
24    , typename Last
25    &gt;
26struct <a href="./iterator-range.html" class="identifier">iterator_range</a>
27{
28    // <em>unspecified</em>
29    // <em>...</em>
30};
31</pre>
32</div>
33<div class="section" id="iterator-description">
34<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
35<p>A view into subset of sequence elements identified by a pair of iterators.</p>
36</div>
37<div class="section" id="iterator-header">
38<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
39<pre class="literal-block">
40#include &lt;<a href="../../../../boost/mpl/fold.hpp" class="header">boost/mpl/fold.hpp</a>&gt;
41</pre>
42</div>
43<div class="section" id="iterator-model-of">
44<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
45<ul class="simple">
46<li><a class="reference" href="./forward-sequence.html">Forward</a>, <a class="reference" href="./bidirectional-sequence.html">Bidirectional</a>, or <a class="reference" href="./random-access-sequence.html">Random Access Sequence</a>, depending on the category
47of the underlaying iterators.</li>
48</ul>
49</div>
50<div class="section" id="iterator-parameters">
51<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
52<table border="1" class="table">
53<colgroup>
54<col width="15%" />
55<col width="36%" />
56<col width="48%" />
57</colgroup>
58<thead valign="bottom">
59<tr><th>Parameter</th>
60<th>Requirement</th>
61<th>Description</th>
62</tr>
63</thead>
64<tbody valign="top">
65<tr><td><tt class="literal"><span class="pre">First</span></tt>,
66<tt class="literal"><span class="pre">Last</span></tt></td>
67<td><a class="reference" href="./forward-iterator.html">Forward Iterator</a></td>
68<td>Iterators identifying the view's boundaries.</td>
69</tr>
70</tbody>
71</table>
72</div>
73<div class="section" id="iterator-expression-semantics">
74<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
75<p>The semantics of an expression are defined only
76where they differ from, or are not defined in <a class="reference" href="./forward-sequence.html">Forward Sequence</a>.</p>
77<p>In the following table, <tt class="literal"><span class="pre">v</span></tt> is an instance of <tt class="literal"><span class="pre"><a href="./iterator-range.html" class="identifier">iterator_range</a></span></tt>, <tt class="literal"><span class="pre">first</span></tt> and <tt class="literal"><span class="pre">last</span></tt> are
78iterators into a <a class="reference" href="./forward-sequence.html">Forward Sequence</a>, and [<tt class="literal"><span class="pre">first</span></tt>, <tt class="literal"><span class="pre">last</span></tt>) form a valid range.</p>
79<table border="1" class="table">
80<colgroup>
81<col width="44%" />
82<col width="56%" />
83</colgroup>
84<thead valign="bottom">
85<tr><th>Expression</th>
86<th>Semantics</th>
87</tr>
88</thead>
89<tbody valign="top">
90<tr><td><pre class="first last literal-block">
91<a href="./iterator-range.html" class="identifier">iterator_range</a>&lt;first,last&gt;
92<a href="./iterator-range.html" class="identifier">iterator_range</a>&lt;first,last&gt;::type
93</pre>
94</td>
95<td>A lazy sequence all the elements in the range
96[<tt class="literal"><span class="pre">first</span></tt>, <tt class="literal"><span class="pre">last</span></tt>).</td>
97</tr>
98</tbody>
99</table>
100</div>
101<div class="section" id="iterator-example">
102<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
103<pre class="literal-block">
104typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,100&gt; r;
105typedef advance_c&lt; <a href="./begin.html" class="identifier">begin</a>&lt;r&gt;::type,10 &gt;::type first;
106typedef advance_c&lt; <a href="./end.html" class="identifier">end</a>&lt;r&gt;::type,-10 &gt;::type last;
107
108<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt; 
109      <a href="./iterator-range.html" class="identifier">iterator_range</a>&lt;first,last&gt;
110    , <a href="./range-c.html" class="identifier">range_c</a>&lt;int,10,90&gt;
111    > ));
112</pre>
113</div>
114<div class="section" id="iterator-see-also">
115<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
116<p><a class="reference" href="./sequences.html">Sequences</a>, <a class="reference" href="./views.html">Views</a>, <a class="refentry reference" href="./filter-view.html"><tt class="refentry literal"><span class="pre">filter_view</span></tt></a>, <a class="refentry reference" href="./transform-view.html"><tt class="refentry literal"><span class="pre">transform_view</span></tt></a>, <a class="refentry reference" href="./joint-view.html"><tt class="refentry literal"><span class="pre">joint_view</span></tt></a>, <a class="refentry reference" href="./zip-view.html"><tt class="refentry literal"><span class="pre">zip_view</span></tt></a>, <a class="refentry reference" href="./max-element.html"><tt class="refentry literal"><span class="pre">max_element</span></tt></a></p>
117<!-- modtime: November 10, 2004 04:39:09 +0000 -->
118<!-- Sequences/Views//joint_view -->
119</div>
120</div>
121
122<div class="footer-separator"></div>
123<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./filter-view.html" class="navigation-link">Prev</a>&nbsp;<a href="./joint-view.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./filter-view.html" class="navigation-link">Back</a>&nbsp;<a href="./joint-view.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./views.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
124</tr></table></body>
125</html>
Note: See TracBrowser for help on using the repository browser.