Boost logo

Boost :

Subject: Re: [boost] [GSoC][Phoenix3] Regarding mutability of arguments passed to phoenix expressions
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-06-11 12:17:10


Eric Niebler wrote:

> That gives us an opportunity to add a new feature to Phoenix: default
> capture modes. I could see something like:
>
> ref[ phoenix-lambda-expression ]
>
> makes default capture by-ref, and
>
> val[ phoenix-lambda-expression ]
>
> makes it by-val. Under the hood, Phoenix would actually be storing every
> captured variable both by value and by reference.

What if the variable is not copyable?
Copying is an expensive operation as well, why do it when you don't need to?


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