Boost logo

Boost :

From: Herb Sutter (hsutter_at_[hidden])
Date: 2000-01-01 20:01:02


>> 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)!

Funny you should say that.

A couple of days ago it occurred to me that expression templates would be an
important and useful library extension (whenever we open up active
standardization again, which I hope will be sooner rather than later; no earlier
than once the TC is finalized in October, of course).

Then it occurred to me that BOOST would be a great forum to get that work
started as a formal library, providing "existing practice" etc. Although basic
expression template work has already been done, published, and otherwise been
available for some years, it (and refinements to it) would be a great addition
to a general-purpose library like BOOST.

Then I felt guilty about proposing such new work to BOOST because I knew I
wouldn't contribute any time to it. As Scott is wont to say, Have a nice day...
:)

Herb

-----Original Message-----
From: Dave Abrahams [mailto:abrahams_at_[hidden]]
Sent: Saturday, January 1, 2000 19:14
To: Herb Sutter; Boost
Subject: [boost] Expression templates

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

------------------------------------------------------------------------
Want to send money instantly to anyone, anywhere, anytime?
You can today at X.com - and we'll give you $20 to try it! Sign
up today at X.com. It's quick, free, & there's no obligation!
http://click.egroups.com/1/332/1/_/9351/_/946772070

-- Talk to your group with your own voice!
-- http://www.egroups.com/VoiceChatPage?listName=boost&m=1


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