Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2005-10-18 07:24:34


"Mats Eklund" <matek994_at_[hidden]> writes:

> Hello,
>
> does anybody know whether there is something fundamentally wrong
> with designing an istream iterator that conforms with the forward,
> or even random access, iterator concepts?

Nope; there's nothing wrong with it. It can get tricky, though: to
meet the forward iterator requirements (operator* must return a true
reference), your iterator would have to keep an internal cache of the
element being referenced.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net