[Issue 20816] this template parameter does not work on static method
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 10 14:55:31 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20816
Mathias LANG <pro.mathias.lang at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pro.mathias.lang at gmail.com
--- Comment #1 from Mathias LANG <pro.mathias.lang at gmail.com> ---
I had a similar problem recently. Wanted to use `typeof(this)` in a factory
method, to return either a `T`, `const(T)`, or `immutable(T)`, but that didn't
work out because you're not supposed to use `this` in a static method. But I
think it would be a welcome enhancement.
--
More information about the Digitalmars-d-bugs
mailing list