On Sun, 03 Feb 2013 08:00:32 -0500, kenji hara <k.hara.pg@gmail.com> wrote:On the contrary with you, I was read that we no longer get an address of
ref returned value by address-op.
@property ref int foo();
static assert(is(typeof(&foo) == ref int function())); // typeof does not
return int*
If I am correct, there is no need for special enhancement like __traits.
You are right, it does not specify this, I was somewhat mistaken.
But the spirit of the proposal seems to suggest that for all intents and purposes, a property's type is the type of it's return value.
A potential workaround could be a la Timon's suggestion:
ref int foowrap() { return foo;}
int *x = &foowrap();
Let's go with the current proposal, and I will address the __traits mechanism separately.