About ref used for performance reasons with struct
Namespace
rswhite4 at googlemail.com
Tue Feb 12 05:59:43 PST 2013
Read my approach. I suggest something like A& a. It's short and
known from C++.
Only in my approach, I suggest a link between the proposal of
deadalnix (compiler optimizations) and generally rvalue
references.
'const ref' will never work the way as we know it from C++.
Walter and Andrei and many others are totally against it.
However, 'auto ref' is also not a real solution, because 'auto
ref' generates 2^(n - 1) permuationen of the same function - code
bloat.
'auto ref' accept of course lvalues and rvalues but you gain no
performance.
More information about the Digitalmars-d
mailing list