Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-01-01 19:14:15


In article <gpfn6sgbrpa0u72nam04to424gu91rt5c0_at_[hidden]> , Herb Sutter
<hsutter_at_[hidden]> wrote in a post to comp.lang.c++.moderated:

> Option 3: Write for_each with expression templates (1 line, plus no
> recalculation of container.end() and no need to remember to write ++i,
> plus x doesn't need to be an int, plus maybe other benefits...)
>
> std::for_each( container.begin(), container.end(), Elem() += x );

Of COURSE! I should have seen this before! Now somebody should write a
little expression template library for boost. This obviously fits our
charter (I think)!

-Dave


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