Why can't I give a function's return type the scope storage class?
Olivier FAURE
couteaubleu at gmail.com
Sat Mar 16 21:26:18 UTC 2019
On Saturday, 16 March 2019 at 17:59:41 UTC, Walter Bright wrote:
> Scope on function return values comes from the scope of any
> arguments passed to the function marked as 'return scope'.
> Scope on a function return with no such arguments is currently
> meaningless in D.
>
> To add such a feature, there woul'd need to be compelling use
> cases.
Wait, what?
You can apply scope to return values?
I thought in the example above, `scope` applied to the `this`
parameter, the same way `return` did?
More information about the Digitalmars-d
mailing list