rvalues -> ref (yup... again!)

Timon Gehr timon.gehr at gmx.ch
Sat Mar 31 13:28:20 UTC 2018


On 30.03.2018 11:06, Atila Neves wrote:
> 
> Right, and I was assuming (perhaps incorrectly) that this existing code 
> was C++, hence me being on board with binding rvalues to const ref there.

That must not happen. D const and C++ const don't even mean the same 
thing, and now suddenly you will see people use extern(C++) just to get 
the binding of rvalues to ref. Add to this the confusing overload 
behavior if const signifies anything other than read-only.


More information about the Digitalmars-d mailing list