25 Iterators library [iterators]

25.6 Stream iterators [stream.iterators]

25.6.2 Class template istream_­iterator [istream.iterator]

25.6.2.3 Operations [istream.iterator.ops]

const T& operator*() const;
Preconditions: in_­stream != nullptr is true.
Returns: value.
const T* operator->() const;
Preconditions: in_­stream != nullptr is true.
Returns: addressof(value).
istream_iterator& operator++();
Preconditions: in_­stream != nullptr is true.
Effects: Equivalent to: if (!(*in_stream >> value)) in_stream = nullptr;
Returns: *this.
istream_iterator operator++(int);
Preconditions: in_­stream != nullptr is true.
Effects: Equivalent to: istream_iterator tmp = *this; ++*this; return tmp;
template<class T, class charT, class traits, class Distance> bool operator==(const istream_iterator<T,charT,traits,Distance>& x, const istream_iterator<T,charT,traits,Distance>& y);
Returns: x.in_­stream == y.in_­stream.
friend bool operator==(const istream_iterator& i, default_sentinel_t);
Returns: !i.in_­stream.