← Back to index
|
Original Bugzilla link
Bug 13106 – Auto ref error when using argument tuple in non-template function
Status
RESOLVED
Resolution
INVALID
Severity
trivial
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2014-07-12T11:49:07Z
Last change time
2018-10-10T22:00:34Z
Assigned to
No Owner
Creator
Daniel Čejchan
Comments
Comment #0
by czdanol — 2014-07-12T11:49:07Z
Hey, this code does not work: template Test( Args ... ) { void test( auto ref Args args ) { } } void main() { Test!int.test( 5 ); } And this one does: template Test( Args ... ) { void test()( auto ref Args args ) { } } void main() { Test!int.test( 5 ); }
Comment #1
by n8sh.secondary — 2018-10-10T22:00:34Z
This isn't related to tuples. This won't compile because only function templates may have `auto ref` parameters.
https://dlang.org/spec/template.html#auto-ref-parameters