Boost logo

Boost :

Subject: Re: [boost] [GSoC][Phoenix3] Regarding mutability of arguments passed to phoenix expressions
From: David Abrahams (dave_at_[hidden])
Date: 2010-06-11 13:16:41


At Fri, 11 Jun 2010 12:36:56 -0400,
Eric Niebler wrote:
>
> On 6/11/2010 12:27 PM, David Abrahams wrote:
> > At Fri, 11 Jun 2010 12:12:27 -0400,
> >>
> >> makes it by-val. Under the hood, Phoenix would actually be storing every
> >> captured variable both by value and by reference.
> >
> > !! Sounds expensive.
>
> The plan has always been to make capture-by-value the default. Saving
> off a reference as well is free.

Yeah, that's a fine default. I mean it's expensive when the user
decides he really wanted the reference.

> > Be cautious, also, about designing for C++98 at
> > the expense of a good 0x interface.
>
> Agreed in principle, but I don't think we have much choice at this
> point. We want Phoenix to be usable today.

Yes, but consider tolerating some inconvenience or ugliness in 03 if
it makes things better under 0x.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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