23 Iterators library [iterators]

23.6 Stream iterators [stream.iterators]

23.6.1 Class template istream_­iterator [istream.iterator]

23.6.1.2 Operations [istream.iterator.ops]

const T& operator*() const;
Expects: in_­stream != nullptr is true.
Returns: value.
const T* operator->() const;
Expects: in_­stream != nullptr is true.
Returns: addressof(value).
istream_iterator& operator++();
Expects: in_­stream != nullptr is true.
Effects: Equivalent to:
if (!(*in_stream >> value))
  in_stream = nullptr;
Returns: *this.
istream_iterator operator++(int);
Expects: 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.