On Wednesday, November 07, 2012 02:15:26 martin wrote: > Wow, now this finally sheds some light on this topic. Do you have > any links regarding their reasoning?
The most recent discussion where Walter and Andrei were part of the discussion was here: http://forum.dlang.org/post/4f84d6dd.5090...@digitalmars.com A key component of the problem is that conversions cause problems. Also, IIRC allowing const ref to take rvalues causes some issues with overloading. Making some changes to ref with regards to escaping apparently could change the situation a bit, and there's even some discussion in there of allowing ref to take rvalues if certain other things in the language are changed, but it's all up in the air at this point. Certainly, it's not a simple matter of just making const ref work with rvalues like most of the people coming from C++ want and expect. - Jonathan M Davis