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>Readable Iterator Concept</title> |
---|
8 | <link rel="stylesheet" href="default.css" type="text/css" /> |
---|
9 | </head> |
---|
10 | <body> |
---|
11 | <h1 class="title">Readable Iterator Concept</h1> |
---|
12 | <div class="document" id="readable-iterator-concept"> |
---|
13 | <p>A class or built-in type <tt class="literal"><span class="pre">X</span></tt> models the <em>Readable Iterator</em> concept |
---|
14 | for value type <tt class="literal"><span class="pre">T</span></tt> if, in addition to <tt class="literal"><span class="pre">X</span></tt> being Assignable and |
---|
15 | Copy Constructible, the following expressions are valid and respect |
---|
16 | the stated semantics. <tt class="literal"><span class="pre">U</span></tt> is the type of any specified member of |
---|
17 | type <tt class="literal"><span class="pre">T</span></tt>.</p> |
---|
18 | <table border="1" class="table"> |
---|
19 | <colgroup> |
---|
20 | <col width="28%" /> |
---|
21 | <col width="20%" /> |
---|
22 | <col width="52%" /> |
---|
23 | </colgroup> |
---|
24 | <thead valign="bottom"> |
---|
25 | <tr><th colspan="3">Readable Iterator Requirements (in addition to Assignable and Copy Constructible)</th> |
---|
26 | </tr> |
---|
27 | <tr><th>Expression</th> |
---|
28 | <th>Return Type</th> |
---|
29 | <th>Note/Precondition</th> |
---|
30 | </tr> |
---|
31 | </thead> |
---|
32 | <tbody valign="top"> |
---|
33 | <tr><td><tt class="literal"><span class="pre">iterator_traits<X>::value_type</span></tt></td> |
---|
34 | <td><tt class="literal"><span class="pre">T</span></tt></td> |
---|
35 | <td>Any non-reference, |
---|
36 | non-cv-qualified type</td> |
---|
37 | </tr> |
---|
38 | <tr><td><tt class="literal"><span class="pre">*a</span></tt></td> |
---|
39 | <td>Convertible to <tt class="literal"><span class="pre">T</span></tt></td> |
---|
40 | <td><dl class="first last"> |
---|
41 | <dt>pre: <tt class="literal"><span class="pre">a</span></tt> is dereferenceable. If <tt class="literal"><span class="pre">a</span> <span class="pre">==</span> <span class="pre">b</span></tt> then <tt class="literal"><span class="pre">*a</span></tt></dt> |
---|
42 | <dd>is equivalent to <tt class="literal"><span class="pre">*b</span></tt>.</dd> |
---|
43 | </dl> |
---|
44 | </td> |
---|
45 | </tr> |
---|
46 | <tr><td><tt class="literal"><span class="pre">a->m</span></tt></td> |
---|
47 | <td><tt class="literal"><span class="pre">U&</span></tt></td> |
---|
48 | <td>pre: <tt class="literal"><span class="pre">pre:</span> <span class="pre">(*a).m</span></tt> is well-defined. Equivalent to <tt class="literal"><span class="pre">(*a).m</span></tt>.</td> |
---|
49 | </tr> |
---|
50 | </tbody> |
---|
51 | </table> |
---|
52 | </div> |
---|
53 | <hr class="footer" /> |
---|
54 | <div class="footer"> |
---|
55 | <a class="reference" href="ReadableIterator.rst">View document source</a>. |
---|
56 | 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. |
---|
57 | </div> |
---|
58 | </body> |
---|
59 | </html> |
---|