std::istream_iterator<T,CharT,Traits,Distance>::operator++, operator++(int)
From cppreference.com
< cpp | iterator | istream iterator
| istream_iterator& operator++(); |
(1) | |
| istream_iterator operator++(int); |
(2) | |
Reads a value from the underlying stream and stores it into the iterator object. If the read fails, the iterator becomes the end-of-stream iterator.
The behavior is undefined if the iterator is end-of-stream iterator.
Contents |
[edit] Parameters
(none)
[edit] Return value
1) *this.
2) An
istream_iterator that holds an unchanged value.[edit] Exceptions
May throw implementation-defined exceptions.
[edit] Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 260 | C++98 | the return type of operator++(int) was istream_iterator&
|
corrected to istream_iterator
|