Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-04-12 20:57:21


"Thorsten Ottosen" <nesotto_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote in message
> news:uzn9hcgip.fsf_at_boost-consulting.com...
> [snip]
>> Seems like this would be more useful.
>
> Perhaps. Do you care to explain why?

It works generically on lvalues and rvalues, so that if someone hands
you a function object f, and some_algo is more efficient when it can
modify its first argument in-place, you can do

    some_algo( mutate_rvalue(f(),0), x );

HTH,

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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