[Issue 4668] Troubles with 'auto ref'
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Dec 9 09:45:14 PST 2015
https://issues.dlang.org/show_bug.cgi?id=4668
ag0aep6g at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ag0aep6g at gmail.com
--- Comment #2 from ag0aep6g at gmail.com ---
(In reply to Infiltrator from comment #1)
> int foo(T)(auto ref T[] arr) { // The auto is invalid as we already have ref
> T[] to specify the type
The auto is fine. http://dlang.org/spec/template.html#auto-ref-parameters
That said, the compiler seems to behave differently now than when the bug was
filed. `&foo!int` is rejected in all cases, now. I'm not sure what exactly the
report is asking for, so this may or may not be good enough to close the issue.
--
More information about the Digitalmars-d-bugs
mailing list