Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-25 08:04:33


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>

> > Yeah, but makes the iterator a /lot/ heavier in the case where it's not
> > stateful. I would want to have the user pass us the appropriate
> > boost::function<>, or such like, when it's stateful. That's not a
change
> I
> > would want to make users pay for.
>
> In other words, make_filtered_iterator requires an Assignable predicate,
and
> will remain so?

'fraid so, unless you can convince me there's a free solution.

BTW, it doesn't seem like the shared_ptr works anyway, since the algorithm
might well copy the iterator internally and move one of the copies,
expecting the other one to remain unmodified.

> Hmmm. :-)
>
> As I said, I don't have a solid argument against the change; go ahead.

Okay, Aleksey, it's all yours. Please be sure to update the docs and add an
assignable check to the test. BTW, I don't mind if you clean up the tests a
bit; they're functional but not pretty ;-)

-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk