| 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>Single Pass Iterator Concept</title> |
|---|
| 8 | <link rel="stylesheet" href="default.css" type="text/css" /> |
|---|
| 9 | </head> |
|---|
| 10 | <body> |
|---|
| 11 | <h1 class="title">Single Pass Iterator Concept</h1> |
|---|
| 12 | <div class="document" id="single-pass-iterator-concept"> |
|---|
| 13 | <p>A class or built-in type <tt class="literal"><span class="pre">X</span></tt> models the <em>Single Pass Iterator</em> |
|---|
| 14 | concept if the following expressions are valid and respect the stated |
|---|
| 15 | semantics.</p> |
|---|
| 16 | <table border="1" class="table"> |
|---|
| 17 | <colgroup> |
|---|
| 18 | <col width="36%" /> |
|---|
| 19 | <col width="33%" /> |
|---|
| 20 | <col width="31%" /> |
|---|
| 21 | </colgroup> |
|---|
| 22 | <thead valign="bottom"> |
|---|
| 23 | <tr><th colspan="3">Single Pass Iterator Requirements (in addition to Incrementable Iterator and Equality |
|---|
| 24 | Comparable)</th> |
|---|
| 25 | </tr> |
|---|
| 26 | <tr><th>Expression</th> |
|---|
| 27 | <th>Return Type</th> |
|---|
| 28 | <th>Assertion/Semantics / |
|---|
| 29 | Pre-/Post-condition</th> |
|---|
| 30 | </tr> |
|---|
| 31 | </thead> |
|---|
| 32 | <tbody valign="top"> |
|---|
| 33 | <tr><td><tt class="literal"><span class="pre">++r</span></tt></td> |
|---|
| 34 | <td><tt class="literal"><span class="pre">X&</span></tt></td> |
|---|
| 35 | <td>pre: <tt class="literal"><span class="pre">r</span></tt> is |
|---|
| 36 | dereferenceable; post: |
|---|
| 37 | <tt class="literal"><span class="pre">r</span></tt> is dereferenceable or |
|---|
| 38 | <tt class="literal"><span class="pre">r</span></tt> is past-the-end</td> |
|---|
| 39 | </tr> |
|---|
| 40 | <tr><td><tt class="literal"><span class="pre">a</span> <span class="pre">==</span> <span class="pre">b</span></tt></td> |
|---|
| 41 | <td>convertible to <tt class="literal"><span class="pre">bool</span></tt></td> |
|---|
| 42 | <td><tt class="literal"><span class="pre">==</span></tt> is an equivalence |
|---|
| 43 | relation over its domain</td> |
|---|
| 44 | </tr> |
|---|
| 45 | <tr><td><tt class="literal"><span class="pre">a</span> <span class="pre">!=</span> <span class="pre">b</span></tt></td> |
|---|
| 46 | <td>convertible to <tt class="literal"><span class="pre">bool</span></tt></td> |
|---|
| 47 | <td><tt class="literal"><span class="pre">!(a</span> <span class="pre">==</span> <span class="pre">b)</span></tt></td> |
|---|
| 48 | </tr> |
|---|
| 49 | <tr><td><tt class="literal"><span class="pre">iterator_traversal<X>::type</span></tt></td> |
|---|
| 50 | <td>Convertible to |
|---|
| 51 | <tt class="literal"><span class="pre">single_pass_traversal_tag</span></tt></td> |
|---|
| 52 | <td> </td> |
|---|
| 53 | </tr> |
|---|
| 54 | </tbody> |
|---|
| 55 | </table> |
|---|
| 56 | </div> |
|---|
| 57 | <hr class="footer" /> |
|---|
| 58 | <div class="footer"> |
|---|
| 59 | <a class="reference" href="SinglePassIterator.rst">View document source</a>. |
|---|
| 60 | 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. |
|---|
| 61 | </div> |
|---|
| 62 | </body> |
|---|
| 63 | </html> |
|---|