Difference between revisions of "cpp/named req/OutputIterator"
From cppreference.com
m (r2.7.3) (Robot: Adding de, es, fr, it, ja, pt, ru, zh) |
(added see also) |
||
Line 37: | Line 37: | ||
| | | | ||
|} | |} | ||
+ | |||
+ | ===See also=== | ||
+ | * [[cpp/iterator|Iterator library]] | ||
[[de:cpp/concept/OutputIterator]] | [[de:cpp/concept/OutputIterator]] |
Revision as of 06:28, 14 January 2013
Template:cpp/concept/title Template:cpp/concept/navbar
An OutputIterator
is an Template:concept that can write to the pointed-to element.
An example of a type that implements OutputIterator
is std::ostream_iterator.
When Template:concept, Template:concept, or Template:concept satisfies the Template:concept requirements in addition to its own requirements, it is described as mutable.
Requirements
In addition to the above requirement, for a type It
to be an OutputIterator
, instances i
and o
of It
must:
Expression | Return | Equivalent expression | Notes |
---|---|---|---|
*i = o | it may not be possible to write twice in the same iterator | ||
++i | It& | After this, copies of i may be invalidated.Post: &r == &++r | |
i++ | const It& | It temp = i; ++i; |
|
*i++ = o | *i = o; ++i; |