SwappableIterator.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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>Swappable Iterator Concept</title>
  8. <link rel="stylesheet" href="../../../rst.css" type="text/css" />
  9. </head>
  10. <body>
  11. <div class="document" id="swappable-iterator-concept">
  12. <h1 class="title">Swappable 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>Swappable Iterator</em> concept
  17. if, in addition to <tt class="docutils literal"><span class="pre">X</span></tt> being Copy Constructible, the following
  18. expressions are valid and respect the stated semantics.</p>
  19. <table border="1" class="docutils">
  20. <colgroup>
  21. <col width="37%" />
  22. <col width="19%" />
  23. <col width="43%" />
  24. </colgroup>
  25. <thead valign="bottom">
  26. <tr><th class="head" colspan="3">Swappable Iterator Requirements (in addition to Copy Constructible)</th>
  27. </tr>
  28. <tr><th class="head">Expression</th>
  29. <th class="head">Return Type</th>
  30. <th class="head">Postcondition</th>
  31. </tr>
  32. </thead>
  33. <tbody valign="top">
  34. <tr><td><tt class="docutils literal"><span class="pre">iter_swap(a,</span> <span class="pre">b)</span></tt></td>
  35. <td><tt class="docutils literal"><span class="pre">void</span></tt></td>
  36. <td>the pointed to values are
  37. exchanged</td>
  38. </tr>
  39. </tbody>
  40. </table>
  41. <dl class="docutils">
  42. <dt>[<em>Note:</em> An iterator that is a model of the <em>Readable</em> and <em>Writable Iterator</em> concepts</dt>
  43. <dd>is also a model of <em>Swappable Iterator</em>. <em>--end note</em>]</dd>
  44. </dl>
  45. </div>
  46. <div class="footer">
  47. <hr class="footer" />
  48. <a class="reference external" href="SwappableIterator.rst">View document source</a>.
  49. 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.
  50. </div>
  51. </body>
  52. </html>