Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/mpl/doc/refmanual/next.html @ 12

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

added boost

File size: 7.7 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<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
7<title>The MPL Reference Manual: next</title>
8<link rel="stylesheet" href="../style.css" type="text/css" />
9</head>
10<body class="docframe refmanual">
11<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>
12<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>
13</tr></table><div class="header-separator"></div>
14<div class="section" id="next">
15<h1><a class="toc-backref" href="./iterator-metafunctions.html#id384" name="next">next</a></h1>
16<div class="section" id="next-synopsis">
17<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
18<pre class="literal-block">
19template&lt;
20      typename Iterator
21    &gt;
22struct <a href="./next.html" class="identifier">next</a>
23{
24    typedef <em>unspecified</em> type;
25};
26</pre>
27</div>
28<div class="section" id="next-description">
29<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
30<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
31overloaded meanings, depending on the type of its argument. For instance,
32if <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
33<a class="reference" href="./integral-constant.html">Integral Constant</a> of the same type. The following specification is
34iterator-specific. Please refer to the corresponding concept's
35documentation for the details of the alternative semantics — <em>end note</em>].</p>
36</div>
37<div class="section" id="next-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/next_prior.hpp" class="header">boost/mpl/next_prior.hpp</a>&gt;
41</pre>
42</div>
43<div class="section" id="next-parameters">
44<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
45<table border="1" class="table">
46<colgroup>
47<col width="19%" />
48<col width="35%" />
49<col width="45%" />
50</colgroup>
51<thead valign="bottom">
52<tr><th>Parameter</th>
53<th>Requirement</th>
54<th>Description</th>
55</tr>
56</thead>
57<tbody valign="top">
58<tr><td><tt class="literal"><span class="pre">Iterator</span></tt></td>
59<td><a class="reference" href="./forward-iterator.html">Forward Iterator</a>.</td>
60<td>An iterator to increment.</td>
61</tr>
62</tbody>
63</table>
64</div>
65<div class="section" id="next-expression-semantics">
66<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
67<p>For any <a class="reference" href="./forward-iterator.html">Forward Iterator</a>s <tt class="literal"><span class="pre">iter</span></tt>:</p>
68<pre class="literal-block">
69typedef <a href="./next.html" class="identifier">next</a>&lt;iter&gt;::type j;
70</pre>
71<table class="field-list" frame="void" rules="none">
72<col class="field-name" />
73<col class="field-body" />
74<tbody valign="top">
75<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>
76</tr>
77<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>
78</tr>
79<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
80is past-the-end. If <tt class="literal"><span class="pre">iter</span></tt> is a user-defined iterator, the
81library-provided default implementation is equivalent to</p>
82<pre class="last literal-block">
83typedef iter::<a href="./next.html" class="identifier">next</a> j;
84</pre>
85</td>
86</tr>
87</tbody>
88</table>
89</div>
90<div class="section" id="next-complexity">
91<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
92<p>Amortized constant time.</p>
93</div>
94<div class="section" id="next-example">
95<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
96<pre class="literal-block">
97typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,1&gt; v;
98typedef <a href="./begin.html" class="identifier">begin</a>&lt;v&gt;::type first;
99typedef <a href="./end.html" class="identifier">end</a>&lt;v&gt;::type last;
100
101<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 > ));
102</pre>
103</div>
104<div class="section" id="next-see-also">
105<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
106<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>
107<!-- modtime: November 11, 2004 11:16:53 +0000 -->
108<!-- Iterators/Iterator Metafunctions//prior |40 -->
109</div>
110</div>
111
112<div class="footer-separator"></div>
113<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>
114</tr></table></body>
115</html>
Note: See TracBrowser for help on using the repository browser.