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)
5 Bidirectional Traversal Concept
6 ...............................
8 A class or built-in type ``X`` models the *Bidirectional Traversal*
9 concept if, in addition to ``X`` meeting the requirements of Forward
10 Traversal Iterator, the following expressions are valid and respect
13 +--------------------------------------------------------------------------------------+
14 |Bidirectional Traversal Iterator Requirements (in addition to Forward Traversal |
16 +--------------------------------+-------------------------------+---------------------+
17 |Expression |Return Type |Assertion/Semantics /|
18 | | |Pre-/Post-condition |
19 +================================+===============================+=====================+
20 |``--r`` |``X&`` |pre: there exists |
21 | | |``s`` such that ``r |
22 | | |== ++s``. post: |
24 | | |dereferenceable. |
25 | | |``--(++r) == r``. |
28 | | |s``. ``&r == &--r``. |
29 +--------------------------------+-------------------------------+---------------------+
30 |``r--`` |convertible to ``const X&`` |:: |
37 +--------------------------------+-------------------------------+---------------------+
38 |``iterator_traversal<X>::type`` |Convertible to | |
39 | |``bidirectional_traversal_tag``| |
41 +--------------------------------+-------------------------------+---------------------+