23 Iterators library [iterators]

23.6 Stream iterators [stream.iterators]

23.6.2 Class template istream_­iterator [istream.iterator] Constructors and destructor [istream.iterator.cons]

constexpr istream_iterator(); constexpr istream_iterator(default_sentinel_t);
Effects: Constructs the end-of-stream iterator, value-initializing value.
Postconditions: in_­stream == nullptr is true.
Remarks: If the initializer T() in the declaration auto x = T(); is a constant initializer ([expr.const]), then these constructors are constexpr constructors.
istream_iterator(istream_type& s);
Effects: Initializes in_­stream with addressof(s), value-initializes value, and then calls operator++().
istream_iterator(const istream_iterator& x) = default;
Postconditions: in_­stream == x.in_­stream is true.
Remarks: If is_­trivially_­copy_­constructible_­v<T> is true, then this constructor is trivial.
~istream_iterator() = default;
Remarks: If is_­trivially_­destructible_­v<T> is true, then this destructor is trivial.