Reference Tuples

BCS ao at pathlink.com
Thu Oct 9 12:18:47 PDT 2008


Reply to Max,

> struct S {
> uint foo = 1;
> }
> void main() {
> S s;
> foreach(i, element; s.tupleof)
> s.tupleof[i] = 2;
> writeln(s.foo);
> }

That's what I have ended up doing every time I have needed this.





More information about the Digitalmars-d mailing list