SwappableIterator.rst 1.1 KB

1234567891011121314151617181920212223
  1. .. Copyright David Abrahams 2006. Distributed under the Boost
  2. .. Software License, Version 1.0. (See accompanying
  3. .. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. Swappable Iterator Concept
  5. ..........................
  6. A class or built-in type ``X`` models the *Swappable Iterator* concept
  7. if, in addition to ``X`` being Copy Constructible, the following
  8. expressions are valid and respect the stated semantics.
  9. +---------------------------------------------------------------------+
  10. |Swappable Iterator Requirements (in addition to Copy Constructible) |
  11. +-------------------------+-------------+-----------------------------+
  12. |Expression |Return Type |Postcondition |
  13. +=========================+=============+=============================+
  14. |``iter_swap(a, b)`` |``void`` |the pointed to values are |
  15. | | |exchanged |
  16. +-------------------------+-------------+-----------------------------+
  17. [*Note:* An iterator that is a model of the *Readable* and *Writable Iterator* concepts
  18. is also a model of *Swappable Iterator*. *--end note*]