auto ref and non-templated functions
Peter Alexander
peter.alexander.au at gmail.com
Mon Dec 24 17:40:15 PST 2012
On Tuesday, 25 December 2012 at 00:56:44 UTC, Peter Alexander
wrote:
> On Monday, 24 December 2012 at 17:40:54 UTC, Jonathan M Davis
> wrote:
>> And if that doesn't work, can we simply make it so that the
>> compiler
>> automatically creates a variable when you pass an rvalue to a
>> non-templated
>> auto ref function?
>
> I don't see any problems with this, but I admittedly haven't
> thought too much about it.
If there are no problems with this way, then what I want to know
is why the template version of auto ref wasn't implemented this
way. The way auto ref is currently implemented for templates is a
bit of a mess.
More information about the Digitalmars-d
mailing list