C++ 概念: Iterator

来自cppreference.com

Iterator概念描述的類型,可用於識別和遍歷容器元素.
Original:
The Iterator concept describes types that can be used to identify and traverse the elements of a container.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iterator是使用迭代器類型:InputIteratorOutputIteratorForwardIteratorBidirectionalIteratorRandomAccessIterator的基本概念。迭代器可以被看作是一個抽象的指針.
Original:
Iterator is the base concept used by other iterator types: InputIterator, OutputIterator, ForwardIterator, BidirectionalIterator, and RandomAccessIterator. Iterators can be thought of as an abstraction of pointers.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 要求

類型It是一個Iterator,除其他要求外,下列條件必須得到​​滿足i這種類型的對象
Original:
For type It to be an Iterator, in addition to the other requirements, the following conditions have to be satisfied for an object i of such type:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expression Return Precondition
*i reference[1] i is dereferenceable [2]
++i It&

[编辑] 另請參閱

[编辑] 腳註

  1. As defined in iterator_traits中
  2. It's a valid iterator pointing to an existing element
Original:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.