Концепции 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.