Standard C++ Library Reference ISO/IEC (VERSION3)
istream_iterator(istream_type& istr);
const U& operator*() const;
const U *operator->() const;
istream_iterator<Ty, Elem, Tr, Diff>& operator++();
istream_iterator<Ty, Elem, Tr, Diff> operator++(int);
};
The template class describes an input iterator object. It extracts objects of class Ty from an input
stream, which it accesses via an object it stores, of type pointer to basic_istream<Elem, Tr>.
After constructing or incrementing an object of class istream_iterator with a non-null stored
pointer, the object attempts to extract and store an object of type Ty from the associated input stream.
If the extraction fails, the object effectively replaces the stored pointer with a null pointer (thus making
an end-of-sequence indicator).
istream_iterator::char_type
typedef Elem char_type;
The type is a synonym for the template parameter Elem.
istream_iterator::istream_iterator
istream_iterator();
istream_iterator(istream_type& istr);
The first constructor initializes the input stream pointer with a null pointer. The second constructor
initializes the input stream pointer with &istr, then attempts to extract and store an object of type Ty.
istream_iterator::istream_type
typedef basic_istream<Elem, Tr> istream_type;
The type is a synonym for basic_istream<Elem, Tr>.
istream_iterator::operator*
const Ty& operator*() const;
The operator returns the stored object of type Ty.
istream_iterator::operator->
const Ty *operator->() const;
The operator returns &**this.