27 Iterators library [iterators]

27.6 Stream iterators [stream.iterators]

27.6.1 Class template istream_­iterator [istream.iterator]

27.6.1.1 istream_­iterator constructors and destructor [istream.iterator.cons]

constexpr istream_iterator();

Effects: Constructs the end-of-stream iterator. If is_­trivially_­default_­constructible_­v<T> is true, then this constructor is a constexpr constructor.

Postconditions: in_­stream == 0.

istream_iterator(istream_type& s);

Effects: Initializes in_­stream with addressof(s). value may be initialized during construction or the first time it is referenced.

Postconditions: in_­stream == addressof(s).

istream_iterator(const istream_iterator& x) = default;

Effects: Constructs a copy of x. If is_­trivially_­copy_­constructible_­v<T> is true, then this constructor is a trivial copy constructor.

Postconditions: in_­stream == x.in_­stream.

~istream_iterator() = default;

Effects: The iterator is destroyed. If is_­trivially_­destructible_­v<T> is true, then this destructor is a trivial destructor.