Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/mpl/doc/refmanual/next.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: 7.9 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: next</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="./distance.html" class="navigation-link">Prev</a>&nbsp;<a href="./prior.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./distance.html" class="navigation-link">Back</a>&nbsp;<a href="./prior.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterator-metafunctions.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="./iterators.html" class="navigation-link">Iterators</a> / <a href="./iterator-metafunctions.html" class="navigation-link">Iterator Metafunctions</a> / <a href="./next.html" class="navigation-link">next</a></td>
16</tr></table><div class="header-separator"></div>
17<div class="section" id="next">
18<h1><a class="toc-backref" href="./iterator-metafunctions.html#id384" name="next">next</a></h1>
19<div class="section" id="next-synopsis">
20<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
21<pre class="literal-block">
22template&lt;
23      typename Iterator
24    &gt;
25struct <a href="./next.html" class="identifier">next</a>
26{
27    typedef <em>unspecified</em> type;
28};
29</pre>
30</div>
31<div class="section" id="next-description">
32<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
33<p>Returns the next iterator in the sequence. [<em>Note:</em> <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a></span></tt> has a number of
34overloaded meanings, depending on the type of its argument. For instance,
35if <tt class="literal"><span class="pre">X</span></tt> is an <a class="reference" href="./integral-constant.html">Integral Constant</a>, <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;X&gt;</span></tt> returns an incremented
36<a class="reference" href="./integral-constant.html">Integral Constant</a> of the same type. The following specification is
37iterator-specific. Please refer to the corresponding concept's
38documentation for the details of the alternative semantics — <em>end note</em>].</p>
39</div>
40<div class="section" id="next-header">
41<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
42<pre class="literal-block">
43#include &lt;<a href="../../../../boost/mpl/next_prior.hpp" class="header">boost/mpl/next_prior.hpp</a>&gt;
44</pre>
45</div>
46<div class="section" id="next-parameters">
47<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
48<table border="1" class="table">
49<colgroup>
50<col width="19%" />
51<col width="35%" />
52<col width="45%" />
53</colgroup>
54<thead valign="bottom">
55<tr><th>Parameter</th>
56<th>Requirement</th>
57<th>Description</th>
58</tr>
59</thead>
60<tbody valign="top">
61<tr><td><tt class="literal"><span class="pre">Iterator</span></tt></td>
62<td><a class="reference" href="./forward-iterator.html">Forward Iterator</a>.</td>
63<td>An iterator to increment.</td>
64</tr>
65</tbody>
66</table>
67</div>
68<div class="section" id="next-expression-semantics">
69<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
70<p>For any <a class="reference" href="./forward-iterator.html">Forward Iterator</a>s <tt class="literal"><span class="pre">iter</span></tt>:</p>
71<pre class="literal-block">
72typedef <a href="./next.html" class="identifier">next</a>&lt;iter&gt;::type j;
73</pre>
74<table class="field-list" frame="void" rules="none">
75<col class="field-name" />
76<col class="field-body" />
77<tbody valign="top">
78<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./forward-iterator.html">Forward Iterator</a>.</td>
79</tr>
80<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">iter</span></tt> is incrementable.</td>
81</tr>
82<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">j</span></tt> is an iterator pointing to the next element in the sequence, or
83is past-the-end. If <tt class="literal"><span class="pre">iter</span></tt> is a user-defined iterator, the
84library-provided default implementation is equivalent to</p>
85<pre class="last literal-block">
86typedef iter::<a href="./next.html" class="identifier">next</a> j;
87</pre>
88</td>
89</tr>
90</tbody>
91</table>
92</div>
93<div class="section" id="next-complexity">
94<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
95<p>Amortized constant time.</p>
96</div>
97<div class="section" id="next-example">
98<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
99<pre class="literal-block">
100typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,1&gt; v;
101typedef <a href="./begin.html" class="identifier">begin</a>&lt;v&gt;::type first;
102typedef <a href="./end.html" class="identifier">end</a>&lt;v&gt;::type last;
103
104<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./next.html" class="identifier">next</a>&lt;first&gt;::type, last > ));
105</pre>
106</div>
107<div class="section" id="next-see-also">
108<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
109<p><a class="reference" href="./iterators.html">Iterators</a>, <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a> / <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a>, <a class="refentry reference" href="./prior.html"><tt class="refentry literal"><span class="pre">prior</span></tt></a>, <a class="refentry reference" href="./deref.html"><tt class="refentry literal"><span class="pre">deref</span></tt></a></p>
110<!-- modtime: November 11, 2004 11:16:53 +0000 -->
111<!-- Iterators/Iterator Metafunctions//prior |40 -->
112</div>
113</div>
114
115<div class="footer-separator"></div>
116<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./distance.html" class="navigation-link">Prev</a>&nbsp;<a href="./prior.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./distance.html" class="navigation-link">Back</a>&nbsp;<a href="./prior.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterator-metafunctions.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>
117</tr></table></body>
118</html>
Note: See TracBrowser for help on using the repository browser.