• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5Readable Iterator Concept
6.........................
7
8A class or built-in type ``X`` models the *Readable Iterator* concept
9for value type ``T`` if, in addition to ``X`` being Assignable and
10Copy Constructible, the following expressions are valid and respect
11the stated semantics. ``U`` is the type of any specified member of
12type ``T``.
13
14+-----------------------------------------------------------------------------------------------------------------------------+
15|Readable Iterator Requirements (in addition to Assignable and Copy Constructible)                                            |
16+-----------------------------------+------------------------+----------------------------------------------------------------+
17|Expression                         |Return Type             |Note/Precondition                                               |
18+===================================+========================+================================================================+
19|``iterator_traits<X>::value_type`` |``T``                   |Any non-reference,                                              |
20|                                   |                        |non-cv-qualified type                                           |
21+-----------------------------------+------------------------+----------------------------------------------------------------+
22|``*a``                             | Convertible to ``T``   |pre: ``a`` is dereferenceable. If ``a == b`` then ``*a``        |
23|                                   |                        | is equivalent to ``*b``.                                       |
24+-----------------------------------+------------------------+----------------------------------------------------------------+
25|``a->m``                           |``U&``                  |pre: ``pre: (*a).m`` is well-defined. Equivalent to ``(*a).m``. |
26+-----------------------------------+------------------------+----------------------------------------------------------------+
27