Boost logo

Boost :

Subject: Re: [boost] [phoenix] request for a mini-review. (Re: Phoenix as a Boost library)
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-10-17 01:01:08


On 10/17/2010 11:32 AM, Dave Abrahams wrote:
>
>
>
> On Oct 16, 2010, at 8:37 PM, Eric Niebler<eric_at_[hidden]> wrote:
>
>> n 10/16/2010 4:41 PM, Mathias Gaunard wrote:
>>> I thought V2 doesn't follow the result_of protocol,
>>
>> True.
>>
>>> and didn't do
>>> perfect forwarding either.
>>
>> I don't think v3 will do perfect forwarding either. At least not with
>> C++03. It's just too expensive at compile time.
>
> You could approximate it for up to 3-5 arguments. But you can't actually do it perfectly in C++03 even for 1 argument because you will erase rvalue-ness no matter what.

Yeah, that's what we do for 03. Let's call it less-than-perfect forwarding.
It's the best we can do. Right now we have a PP constant for that. Mind you,
even 3 args is still quite expensive! Then we have 2 more PP constants
for all refs and another for all const refs.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net

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