iterator_concepts.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. .. 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. ++++++++++++++++++
  5. Iterator Concepts
  6. ++++++++++++++++++
  7. :Author: David Abrahams, Jeremy Siek, Thomas Witt
  8. :Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@styleadvisor.com
  9. :organization: `Boost Consulting`_, Indiana University `Open Systems
  10. Lab`_, `Zephyr Associates, Inc.`_
  11. :date: $Date$
  12. :copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2004.
  13. .. _`Boost Consulting`: http://www.boost-consulting.com
  14. .. _`Open Systems Lab`: http://www.osl.iu.edu
  15. .. _`Zephyr Associates, Inc.`: http://www.styleadvisor.com
  16. :abstract: The iterator concept checking classes provide a mechanism for
  17. a template to report better error messages when a user instantiates
  18. the template with a type that does not meet the requirements of
  19. the template.
  20. For an introduction to using concept checking classes, see
  21. the documentation for the |concepts|_ library.
  22. .. |concepts| replace:: ``boost::concept_check``
  23. .. _concepts: ../../concept_check/index.html
  24. Reference
  25. =========
  26. Iterator Access Concepts
  27. ........................
  28. * |Readable|_
  29. * |Writable|_
  30. * |Swappable|_
  31. * |Lvalue|_
  32. .. |Readable| replace:: *Readable Iterator*
  33. .. _Readable: ReadableIterator.html
  34. .. |Writable| replace:: *Writable Iterator*
  35. .. _Writable: WritableIterator.html
  36. .. |Swappable| replace:: *Swappable Iterator*
  37. .. _Swappable: SwappableIterator.html
  38. .. |Lvalue| replace:: *Lvalue Iterator*
  39. .. _Lvalue: LvalueIterator.html
  40. Iterator Traversal Concepts
  41. ...........................
  42. * |Incrementable|_
  43. * |SinglePass|_
  44. * |Forward|_
  45. * |Bidir|_
  46. * |Random|_
  47. .. |Incrementable| replace:: *Incrementable Iterator*
  48. .. _Incrementable: IncrementableIterator.html
  49. .. |SinglePass| replace:: *Single Pass Iterator*
  50. .. _SinglePass: SinglePassIterator.html
  51. .. |Forward| replace:: *Forward Traversal*
  52. .. _Forward: ForwardTraversal.html
  53. .. |Bidir| replace:: *Bidirectional Traversal*
  54. .. _Bidir: BidirectionalTraversal.html
  55. .. |Random| replace:: *Random Access Traversal*
  56. .. _Random: RandomAccessTraversal.html
  57. ``iterator_concepts.hpp`` Synopsis
  58. ..................................
  59. ::
  60. namespace boost_concepts {
  61. // Iterator Access Concepts
  62. template <typename Iterator>
  63. class ReadableIteratorConcept;
  64. template <
  65. typename Iterator
  66. , typename ValueType = std::iterator_traits<Iterator>::value_type
  67. >
  68. class WritableIteratorConcept;
  69. template <typename Iterator>
  70. class SwappableIteratorConcept;
  71. template <typename Iterator>
  72. class LvalueIteratorConcept;
  73. // Iterator Traversal Concepts
  74. template <typename Iterator>
  75. class IncrementableIteratorConcept;
  76. template <typename Iterator>
  77. class SinglePassIteratorConcept;
  78. template <typename Iterator>
  79. class ForwardTraversalConcept;
  80. template <typename Iterator>
  81. class BidirectionalTraversalConcept;
  82. template <typename Iterator>
  83. class RandomAccessTraversalConcept;
  84. // Interoperability
  85. template <typename Iterator, typename ConstIterator>
  86. class InteroperableIteratorConcept;
  87. }