[Issue 2411] Reference Tuple Foreach
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 1 08:31:06 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=2411
--- Comment #5 from Kenji Hara <k.hara.pg at gmail.com> 2012-01-01 08:31:04 PST ---
My patch requires explicit 'ref'.
void main() {
S s;
// foreach( element; s.tupleof) // doesn't work
foreach(ref element; s.tupleof) // OK
element = 2;
assert(s.foo == 2);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list