From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-02-28 07:24:21
> --- In boost_at_y..., Gary Powell <Gary.Powell_at_s...> wrote:
> > Well if your compiler has partial specialization, lambda does this
> > nicely.
> > std::for_each(c.begin(), c.end(),
> > _Fn);
> > Where _Fn can be another Lambda statement or a functor.
> > -gary-
> As much as I enjoy LL (I demand LL support to even consider using a
> compiler !), I think it's more a job for an iterator adaptor
> based on a pair<OuterContainerIterator, InnerContainerIterator>
> ( I've hastly crafted some ugly code to do that),
> but maybe a deep_view would be even better :-)
Yep, I'm a big fan of lambda-type libraries as well, but in this case I'd
void apply_fn(CType & t)
std::for_each(t.begin(), t.end(), Fn);
std::for_each(c.begin(), c.end(), apply_fn);
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk