Bug 2622 – ref returns not allowed in complex template

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2009-01-27T10:30:00Z
Last change time
2015-06-09T05:15:06Z
Assigned to
bugzilla
Creator
andrei

Comments

Comment #0 by andrei — 2009-01-27T10:30:12Z
import std.typecons; struct Proxy(R...) { Tuple!(int*, float*) ptrs; // enable this.at!(ct_constant) ref R[i] at(int i)(); } void main() { Proxy!(int, float) p; auto x = p.at!(1); } fails to compile with the error message: variable test.Proxy!(int,float).Proxy.i only parameters or foreach declarations can be ref
Comment #1 by bugzilla — 2009-03-11T14:57:46Z
Fixed dmd 2.026