Files
mpl/doc/ref/Input_Iterator.html
Aleksey Gurtovoy 43af4b3bea update reference docs
[SVN r20792]
2003-11-12 07:55:12 +00:00

44 lines
2.7 KiB
HTML

<!doctype html public "-//ietf//dtd html//en">
<html><head><title>boost::mpl::Input Iterator</title>
<link rel="stylesheet" href="./mpl_wiki.css">
</head><body bgcolor="white">
<h1><a href="./Table_of_Contents.html"><img src="./mpl_logo.jpg" alt="[Home]" border=0 align="right"></a>Input Iterator</h1><h3>Description</h3>
<p>
An Input Iterator is a <a href="./Trivial_Iterator.html">Trivial Iterator</a> that provides a way to obtain the next iterator in a sequence.
<p>
<h3>Refinement of</h3>
<p>
<a href="./Trivial_Iterator.html">Trivial Iterator</a>
<p>
<h3>Definitions</h3>
<p>
<ul>
<li>an input iterator is <em>past-the-end</em> if it points beyond the last element of a sequence; past-the-end iterators are non-dereferenceable;
<li>an input iterator is <em>valid</em> if it is dereferenceable or past-the-end;
<li>an input iterator <code>i</code> is <em>incrementable</em> if there is a "next" iterator, that is, if <code>i::next</code> expression is well-defined; past-the-end iterators are not incrementable;
<li>an input iterator <code>j</code> is <em>reachable</em> from an input iterator <code>i</code> if, after recursive application of <code>next</code> operation to <code>i</code> a finite number of times, <code>i</code> is identical to <code>j</code>;
<li>the notation <code>[i,j)</code> refers to a <em>range</em> of iterators beginning with <code>i</code> and up to but not including <code>j</code>;
<li>the range <code>[i,j)</code> is a <em>valid range</em> if both <code>i</code> and <code>j</code> are valid iterators, and <code>j</code> is reachable from <code>i</code>.
</ul>
<p>
<h3>Valid expressions</h3>
<p>
In addition to the expressions defined in <a href="./Trivial_Iterator.html">Trivial Iterator</a>, the following expressions must be valid.
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Expression type &nbsp;</th></tr>
<tr><td><code>typename i::next</code></td><td>A model of <a href="./Input_Iterator.html">Input Iterator</a> </td></tr>
</table>
<p>
<h3>Expression semantics</h3>
<p>
<table border="1">
<tr><th>&nbsp;Expression&nbsp;</th><th>&nbsp;Complexity&nbsp;</th><th>&nbsp;Precondition&nbsp;</th><th>&nbsp;Semantics&nbsp;</th><th>&nbsp;Postcondition &nbsp;</th></tr>
<tr><td><code>typename i::next</code></td><td>Amortized constant time</td><td><code>i</code> is incrementable</td><td><code>i::next</code> is the next iterator in a sequence</td><td><code>i::next</code> is dereferenceable or past-the-end </td></tr>
</table>
<p>
<h3>See also</h3>
<p>
<a href="./Sequence.html">Sequence</a>, <a href="./Trivial_Iterator.html">Trivial Iterator</a>, <a href="./Forward_Iterator.html">Forward Iterator</a>
<p><hr>
<a href="./Table_of_Contents.html">Table of Contents</a><br>Last edited April 21, 2003 4:14 pm</body></html>