2016-09-14 21:50 GMT+02:00 <
barry....@gmail.com>:
>> > Should the constructor template take a forwarding reference instead of
>> > just
>> > a value?
>>
>> That sounds plausible, yes.
>
> Can I propose we make that a [minor and easy to fix] LWG defect? The
> forwarding-reference constructor saves a move over the by-value constructor,
> and it's more consistent with assignment operator.
Makes sense to me, please submit it to the lwgchair address.
> Is there a reason to specifically prefer a by-value constructor over a
> forwarding-reference one?
The only reason I can imagine is that you need carefully check the
existing specification for unwanted side-effects of that change. One
example of this is that now F could be a reference type and
cv-qualified, so presumably you need some wording massaging taking
advantage of std::decay_t (see wording for std::any as a similar
example).
Thanks,
- Daniel