Standard C++ Library Reference ISO/IEC (VERSION3)
istream_iterator::operator++
istream_iterator<Ty, Elem, Tr, Diff>& operator++();
istream_iterator<Ty, Elem, Tr, Diff> operator++(int);
The first operator attempts to extract and store an object of type Ty from the associated input stream.
The second operator makes a copy of the object, increments the object, then returns the copy.
istream_iterator::traits_type
typedef Tr traits_type;
The type is a synonym for the template parameter Tr.
istreambuf_iterator
template<class Elem, class Tr = char_traits<Elem> >
class istreambuf_iterator
: public iterator<input_iterator_tag,
Elem, typename Ty::off_type, Elem *, Elem&> {
public:
typedef Elem char_type;
typedef Tr traits_type;
typedef typename Tr::int_type int_type;
typedef basic_streambuf<Elem, Tr> streambuf_type;
typedef basic_istream<Elem, Tr> istream_type;
istreambuf_iterator(streambuf_type *strbuf = 0) throw();
istreambuf_iterator(istream_type& istr) throw();
Elem operator*() const;
istreambuf_iterator& operator++();
istreambuf_iterator operator++(int);
bool equal(const istreambuf_iterator& right) const;
};
The template class describes an input iterator object. It extracts elements of class Elem from an input
stream buffer, which it accesses via an object it stores, of type pointer to
basic_streambuf<Elem, Tr>. After constructing or incrementing an object of class
istreambuf_iterator with a non-null stored pointer, the object effectively attempts to extract
and store an object of type Elem from the associated itput stream. (The extraction may be delayed,
however, until the object is actually dereferenced or copied.) If the extraction fails, the object
effectively replaces the stored pointer with a null pointer (thus making an end-of-sequence indicator).
istreambuf_iterator::char_type
typedef Elem char_type;
The type is a synonym for the template parameter Elem.