<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.3.1: http://docutils.sourceforge.net/" /> <title>Single Pass Iterator Concept</title> <link rel="stylesheet" href="default.css" type="text/css" /> </head> <body> <div class="document" id="single-pass-iterator-concept"> <h1 class="title">Single Pass Iterator Concept</h1> <p>A class or built-in type <tt class="literal"><span class="pre">X</span></tt> models the <em>Single Pass Iterator</em> concept if the following expressions are valid and respect the stated semantics.</p> <table border class="table"> <colgroup> <col width="36%" /> <col width="33%" /> <col width="31%" /> </colgroup> <thead valign="bottom"> <tr><th colspan="3">Single Pass Iterator Requirements (in addition to Incrementable Iterator and Equality Comparable)</th> </tr> <tr><th>Expression</th> <th>Return Type</th> <th>Assertion/Semantics / Pre-/Post-condition</th> </tr> </thead> <tbody valign="top"> <tr><td><tt class="literal"><span class="pre">++r</span></tt></td> <td><tt class="literal"><span class="pre">X&</span></tt></td> <td>pre: <tt class="literal"><span class="pre">r</span></tt> is dereferenceable; post: <tt class="literal"><span class="pre">r</span></tt> is dereferenceable or <tt class="literal"><span class="pre">r</span></tt> is past-the-end</td> </tr> <tr><td><tt class="literal"><span class="pre">a</span> <span class="pre">==</span> <span class="pre">b</span></tt></td> <td>convertible to <tt class="literal"><span class="pre">bool</span></tt></td> <td><tt class="literal"><span class="pre">==</span></tt> is an equivalence relation over its domain</td> </tr> <tr><td><tt class="literal"><span class="pre">a</span> <span class="pre">!=</span> <span class="pre">b</span></tt></td> <td>convertible to <tt class="literal"><span class="pre">bool</span></tt></td> <td><tt class="literal"><span class="pre">!(a</span> <span class="pre">==</span> <span class="pre">b)</span></tt></td> </tr> <tr><td><tt class="literal"><span class="pre">iterator_traversal<X>::type</span></tt></td> <td>Convertible to <tt class="literal"><span class="pre">single_pass_traversal_tag</span></tt></td> <td> </td> </tr> </tbody> </table> </div> <hr class="footer" /> <div class="footer"> <a class="reference" href="SinglePassIterator.rst">View document source</a>. Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> </body> </html>