]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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 | ||
5 | Incrementable Iterator Concept | |
6 | .............................. | |
7 | ||
8 | A class or built-in type ``X`` models the *Incrementable Iterator* | |
9 | concept if, in addition to ``X`` being Assignable and Copy | |
10 | Constructible, the following expressions are valid and respect the | |
11 | stated semantics. | |
12 | ||
13 | ||
14 | +-------------------------------------------------------------------------------------+ | |
15 | |Incrementable Iterator Requirements (in addition to Assignable, Copy Constructible) | | |
16 | | | | |
17 | +--------------------------------+-------------------------------+--------------------+ | |
18 | |Expression |Return Type |Assertion/Semantics | | |
19 | +================================+===============================+====================+ | |
20 | |``++r`` |``X&`` |``&r == &++r`` | | |
21 | +--------------------------------+-------------------------------+--------------------+ | |
22 | |``r++`` |``X`` |:: | | |
23 | | | | | | |
24 | | | | { | | |
25 | | | | X tmp = r; | | |
26 | | | | ++r; | | |
27 | | | | return tmp; | | |
28 | | | | } | | |
29 | +--------------------------------+-------------------------------+--------------------+ | |
30 | |``iterator_traversal<X>::type`` |Convertible to | | | |
31 | | |``incrementable_traversal_tag``| | | |
32 | +--------------------------------+-------------------------------+--------------------+ |