| 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>Incrementable Iterator Concept</title> | 
|---|
| 8 | <link rel="stylesheet" href="default.css" type="text/css" /> | 
|---|
| 9 | </head> | 
|---|
| 10 | <body> | 
|---|
| 11 | <h1 class="title">Incrementable Iterator Concept</h1> | 
|---|
| 12 | <div class="document" id="incrementable-iterator-concept"> | 
|---|
| 13 | <p>A class or built-in type <tt class="literal"><span class="pre">X</span></tt> models the <em>Incrementable Iterator</em> | 
|---|
| 14 | concept if, in addition to <tt class="literal"><span class="pre">X</span></tt> being Assignable and Copy | 
|---|
| 15 | Constructible, the following expressions are valid and respect the | 
|---|
| 16 | stated semantics.</p> | 
|---|
| 17 | <table border="1" class="table"> | 
|---|
| 18 | <colgroup> | 
|---|
| 19 | <col width="39%" /> | 
|---|
| 20 | <col width="37%" /> | 
|---|
| 21 | <col width="24%" /> | 
|---|
| 22 | </colgroup> | 
|---|
| 23 | <thead valign="bottom"> | 
|---|
| 24 | <tr><th colspan="3">Incrementable Iterator Requirements (in addition to Assignable, Copy Constructible)</th> | 
|---|
| 25 | </tr> | 
|---|
| 26 | <tr><th>Expression</th> | 
|---|
| 27 | <th>Return Type</th> | 
|---|
| 28 | <th>Assertion/Semantics</th> | 
|---|
| 29 | </tr> | 
|---|
| 30 | </thead> | 
|---|
| 31 | <tbody valign="top"> | 
|---|
| 32 | <tr><td><tt class="literal"><span class="pre">++r</span></tt></td> | 
|---|
| 33 | <td><tt class="literal"><span class="pre">X&</span></tt></td> | 
|---|
| 34 | <td><tt class="literal"><span class="pre">&r</span> <span class="pre">==</span> <span class="pre">&++r</span></tt></td> | 
|---|
| 35 | </tr> | 
|---|
| 36 | <tr><td><tt class="literal"><span class="pre">r++</span></tt></td> | 
|---|
| 37 | <td><tt class="literal"><span class="pre">X</span></tt></td> | 
|---|
| 38 | <td><pre class="first last literal-block"> | 
|---|
| 39 | { | 
|---|
| 40 |    X tmp = r; | 
|---|
| 41 |    ++r; | 
|---|
| 42 |    return tmp; | 
|---|
| 43 | } | 
|---|
| 44 | </pre> | 
|---|
| 45 | </td> | 
|---|
| 46 | </tr> | 
|---|
| 47 | <tr><td><tt class="literal"><span class="pre">iterator_traversal<X>::type</span></tt></td> | 
|---|
| 48 | <td>Convertible to | 
|---|
| 49 | <tt class="literal"><span class="pre">incrementable_traversal_tag</span></tt></td> | 
|---|
| 50 | <td> </td> | 
|---|
| 51 | </tr> | 
|---|
| 52 | </tbody> | 
|---|
| 53 | </table> | 
|---|
| 54 | </div> | 
|---|
| 55 | <hr class="footer" /> | 
|---|
| 56 | <div class="footer"> | 
|---|
| 57 | <a class="reference" href="IncrementableIterator.rst">View document source</a>. | 
|---|
| 58 | 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. | 
|---|
| 59 | </div> | 
|---|
| 60 | </body> | 
|---|
| 61 | </html> | 
|---|