rvalue references
Diggory
diggsey at googlemail.com
Sat Apr 27 08:57:10 PDT 2013
>
> scope ref T func(scope ref T t) { return t; }
>
> I think this solves the problem.
It doesn't for several reasons:
- You're completely changing the meaning of "scope" for one
specific case
- This will break DIP25A which only works if scope values cannot
be returned
- "scope" binds to the function rather than the return type, so
in this case is equivalent to making the hidden "this" pointer a
"scope" parameter.
More information about the Digitalmars-d
mailing list