ReadableIterator.html 3.3 KB

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