Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost-users] istream_iterator question - need Steven's help
From: Max (more4less_at_[hidden])
Date: 2009-05-17 02:21:38


hello Steven,

I do appreciate your prompt reply.

> AMDG
> Well, it solves your problem, but it creates other problems instead.
>
> For example, what should this do:
> std::istream_iterator<int> iter(std::cin);
> std::advance(iter, 10);
>
> Or this:
> std::istream_iterator<int> iter(std::cin);
> if(*iter != 10) {
> std::cout << *iter;
> }
>
> In Christ,
> Steven Watanabe

Yes, my simple modification is obviously not complete and will
cause other problems including those you mentioned. But I
believe we are not at the situation that we should bear one of
the two kinds of problems. There must be a sound solution, I guess.

Or, in other words, in the situation as that I mentioned in my first
post, should I use the ugly-looking explicit for loops instead of using
the seemingly elegant iterator adaptor approach? :-)

Thanks again for your time, Steven.

B/Rgds
Max


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