rvalue references
Namespace via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 2 09:02:55 PDT 2015
Thanks to DIP 25 I think it's time to review this again. I would
implement it (if no one else wants to do it), but there are still
some unanswered questions:
1. Is 'auto ref' still the chosen syntax (I guess so)?
2. Should auto ref for templates act like auto ref for
non-templates (creates a temporary and pass it by ref) or should
the current behaviour stay (duplicate the function 2^N times)?
3. What's with return ref, should auto ref for non-templates
include return ref (like auto ref for templates)?
4. What's with this constellation:
struct S { }
void ene(S) { }
void mene(ref S) { }
void muh(auto ref S) { }
should 'mene' (ref) interfere with 'muh' (auto ref)?
More information about the Digitalmars-d
mailing list