alias this to a template function
Adam D. Ruppe
destructionator at gmail.com
Sun Nov 11 14:28:21 PST 2012
On Sunday, 11 November 2012 at 22:25:11 UTC, Jonathan M Davis
wrote:
> You can only alias types and variables. A templated type isn't
> a type until it's been fully instantiated.
This compiles today though:
struct Test{
alias get this;
T get(T)() { return T.init; }
}
It is just useless because there's no way to instantiate it
though the alias this (you must do .get!T).
More information about the Digitalmars-d
mailing list