On Tuesday, 25 December 2012 at 14:11:14 UTC, Andrei Alexandrescu
wrote:
On 12/25/12 5:36 AM, Jonathan M Davis wrote:
However, creating only one version of the function which takes
all refs and
specifcally creating variables underneath the hood for any
rvalues so that
they can be passed to the function still seems like it could
work.
Yes, that does work and is easy to implement.
Is there any reason this hasn't been implemented? And why aren't
template auto ref functions implemented like that? It would be a
bit of a shame if auto ref in template functions works
differently to auto ref in non-template function.