Subject: Re: [boost] Boost.RangeEx: contains?
From: Eric Niebler (eric_at_[hidden])
Date: 2009-02-23 12:20:30
Robert Jones wrote:
> I'm sorry if I'm being a bit slow here, but I've lost the thread somewhat!
> "...most algorithms can be implemented in terms of fold.",
> "...what is the fold algorithm?".
> So most algorithms can be implemented in terms of std::accumulate?
> Have I understood that right?
> If so I think I can see your point, but surely empty() in terms of std::
> would be a bit obtuse?
And that's my point exactly. I feel that this:
boost::find( rng | filtered(pred) )
is more obscure than this:
boost::find_if( rng, pred );
Not only that, but I presume their return types are different, too. The
first would return filtered iterators, the second the original
iterators. Isn't that right?
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk