<div dir="ltr">2013/2/4 Steven Schveighoffer <span dir="ltr"><<a href="mailto:schveiguy@yahoo.com" target="_blank">schveiguy@yahoo.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On Sun, 03 Feb 2013 08:00:32 -0500, kenji hara <<a href="mailto:k.hara.pg@gmail.com" target="_blank">k.hara.pg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">
On the contrary with you, I was read that we no longer get an address of<br>
ref returned value by address-op.<br>
<br>
@property ref int foo();<br>
static assert(is(typeof(&foo) == ref int function()));  // typeof does not<br>
return int*<br>
<br>
If I am correct, there is no need for special enhancement like __traits.<br>
</div></blockquote>
<br>
You are right, it does not specify this, I was somewhat mistaken.<br>
<br>
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.<br></blockquote><div style>[snip]</div><div style><br></div><div style>It is already satisfied. Inside typeof, all use of property makes its return type.</div>
<div style>I think the case of getting address of ref value returned from a property is much rare. </div><div> </div><div>If you really want to do it, we can write short workaround.</div><div style><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

A potential workaround could be a la Timon's suggestion:<br>
<br>
ref int foowrap() { return foo;}<br>
int *x = &foowrap();<br></blockquote><div><br></div><div style>One liner version:</div><div> </div><div><div>int* x = ((ref x) => &x)(foo);</div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Let's go with the current proposal, and I will address the __traits mechanism separately.<br></blockquote><div><br></div><div style>It seems to me that is an overkill.</div><div style><br></div><div style>Kenji Hara </div>
</div></div></div>