digitalmars.D.learn - difference between C++11 rvalue references && and D's proposed rvalue
- Timothee Cour (5/5) Apr 15 2013 What would be the difference between C++11's rvalue reference && (see
- Namespace (11/21) Apr 16 2013 T& or T&& looks very nice but is far more complicated than scope
What would be the difference between C++11's rvalue reference && (see for example http://thbecker.net/articles/rvalue_references/section_03.html) and D's proposed rvalue references (eg http://wiki.dlang.org/DIP36) ? So far I only saw C++'s const & mentioned, but C++11's && seems pretty close. Which brings yet another naming proposal for D's rvalue reference, namely &&.
Apr 15 2013
On Monday, 15 April 2013 at 23:16:57 UTC, Timothee Cour wrote:What would be the difference between C++11's rvalue reference && (see for example http://thbecker.net/articles/rvalue_references/section_03.html) and D's proposed rvalue references (eg http://wiki.dlang.org/DIP36) ? So far I only saw C++'s const & mentioned, but C++11's && seems pretty close. Which brings yet another naming proposal for D's rvalue reference, namely &&.T& or T&& looks very nice but is far more complicated than scope ref or something like that. It was huge complicated to implement T& (and as you can see in my thread this still do not work for templates). And as long as Andrei/Walter/Kenji give no response, it is impossible to make a decision. But I still like T& and T&&. :) I'm still miss an offical statement from Walter/Andrei/Kenji. Especially now, because today it is exactly a year past since this topic was the first time officially discussed.
Apr 16 2013