My thoughts & tries with rvalue references

Benjamin Thaut code at benjamin-thaut.de
Sat Mar 30 03:48:34 PDT 2013


Am 30.03.2013 11:12, schrieb Minas Mina:
> On Saturday, 30 March 2013 at 09:17:17 UTC, Namespace wrote:
>> And to pull the reverse: Why should '@val ref' be more intuitive than
>> ref&? Or why should be '@ref' more intuitive?
>> What I mean by that:
>> Both the Property as well as the hybrid path have their weaknesses and
>> are not necessarily immediately obvious. But we should choose one of
>> them and focus on this so that somebody can make a pull request for it.
>
> Because & in C++ means "by ref".
> D has "ref" for that.
>
> So ref& doesn't make sense. One might think it as a double reference(?)

I have to agree on that. My first impression was that ref& is equal to 
c++11 &&

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list