C++ 概念: Iterator
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
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.
You can help to correct and verify the translation. Click here for instructions.
Iterator是使用迭代器類型:InputIterator,OutputIterator,ForwardIterator,BidirectionalIterator和RandomAccessIterator的基本概念。迭代器可以被看作是一個抽象的指針.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.
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.
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& |
[编辑] 另請參閱
[编辑] 腳註
- ↑ As defined in iterator_traits中
- ↑ 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.
You can help to correct and verify the translation. Click here for instructions.