The liabilities of binding rvalues to ref

Walter Bright newshound2 at digitalmars.com
Sat May 4 23:05:41 PDT 2013


One solution poffered was making rvalues only bindable to const ref. Andrei's 
position was that this prevented many important use cases.

The trouble was that const is transitive, and yet what was desired here was 
so-called "head const". D doesn't have a concept of head const.

(C++ const is always "head const".)


More information about the Digitalmars-d mailing list