C++ 概念: InputIterator
来自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. |
InputIterator是Iterator,可以读取所指向的元素.Original:
An
InputIterator is an Iterator that can read from the pointed-to element.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是InputIterator,实例a和bIt必须:Original:
In addition to the above requirements, for a type
It to be an InputIterator, instances a and b of It must: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 | Equivalent expression | Notes |
|---|---|---|---|
| a != b | bool | !(a == b) | |
| *a | value_type | If a == b equivalent to *b |
|
| a->m | (*a).m | ||
| ++a | It& | After this, copies of a may be invalidated
| |
| a++ | ++a | ||
| *a++ | value_type | value_type t = *a; ++a; |