Concept BidirectionalIterator
BidirectionalIterator
一个 bidirectional iterator 是一个能够读取一个值序列的 iterator 。它可以在 sequence 中沿两个方向运动,既可以是 mutable (它所指向的内容可以被改变)也可以是 not mutable 。
一 个 iterator 表示一个 sequence 中的一个 position 。也就是说, iterator 可以指向 sequence 的内部(当 dereference 及被 incrementable 时,返回一个 value ),或者 off-the-end (不能 dereferenceable 或 incrementable )
Refinement of(强化自)
Associated types(相关型别)
-
value_type
std::iterator_traits
::value_type The value type of the iterator
-
category
std::iterator_traits
::iterator_category The category of the iterator
Notation(符号)
- Iter
- A type playing the role of iterator-type in the BidirectionalIterator concept.
-
i,j - Objects of type Iter
x- Object of type value_type
Valid expressions(有效表达式)
| Name | Expression | Type | Precondition | Semantics | Postcondition |
|---|---|---|---|---|---|
Predecrement | --i | Iter & |
| ||
Postdecrement | i-- | Iter | Same as for predecrement | Equivalent to |
|

没有评论:
发表评论