Subject: Re: [boost] [variant] Basic rvalue and C++11 features support
From: Joel de Guzman (djowel_at_[hidden])
Date: 2013-01-11 18:50:10
On 1/12/13 1:26 AM, Peter Dimov wrote:
> Paul Smith wrote:
>> On Fri, Jan 11, 2013 at 6:35 PM, Peter Dimov <lists_at_[hidden]> wrote:
>> > Paul Smith wrote:
>> >> Still, there's no need to supress move construction in the absence of
>> >> a no-throw default constructible type.
>> > No, you could still keep the current behavior.
>> I think this was affirmative, but I'm not sure.
> It was. :-) No, there's no need to suppress move construction. Not having a move
> constructor isn't really any better than having the throwing one.
> I'm not sure whether this will be satisfactory from Spirit point of view though. Do all
> Spirit uses contain an appropriate fallback type?
At least all of the grammars I write do. That is also what I advocate.
You'll almost always need a "blank" type in there to represent the
"no-match" case and variant always default constructs with the first
type in the type-list, and users are warned not to have heavy objects
as the first type.
-- Joel de Guzman http://www.boostpro.com http://boost-spirit.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk