On Sun, 03 Feb 2013 10:56:50 -0500, kenji hara <[email protected]> wrote:
2013/2/4 Steven Schveighoffer <[email protected]>
ref int foowrap() { return foo;}
int *x = &foowrap();
One liner version:
int* x = ((ref x) => &x)(foo);
That looks better than mine, it takes a bit to understand it :) It can be
written into a global function:
T *addressOf(T)(ref T t) {return &t;}
I think this should actually work:
int *x = foo.addressOf;
Let's go with the current proposal, and I will address the __traits
mechanism separately.
It seems to me that is an overkill.
I have other ideas for such a feature, which map into something I've
wished for a long time. You will see.
-Steve