On Tuesday, 23 June 2015 at 01:01:26 UTC, Andrei Alexandrescu
wrote:
On 6/22/15 4:09 PM, Timon Gehr wrote:
There is no reason to prevent templates from using the
mechanism that
generates only one copy. The two mechanisms shouldn't share
the same
syntax, because then there is no way to tell them apart for
template
functions.
I understand. For my money I'd be okay with what's being
proposed instead of complicating the language yet again for the
perfect solution. -- Andrei
There is no perfect solution. :) Some are for in/scope ref, some
are against it. Some are for auto ref, some are against it and
even a few are for const ref but most are against it. So the
perfect solution does not exist. And since scope/in ref was
already rejected (DIP 36) I think auto ref is the only choice to
introduce this feature without introducing a new attribute. And
since you reverted the introducing of virtual because it has not
enough value, I'm sure that introducing a new attribute just to
accept both, lvalues and rvalues, wouldn't have enough value as
well. I think the way it is implemented right now is good enough,
but what matters is what you and Walter think.