Aliasing of template results
Jesse Phillips
jessekphillips+D at gmail.com
Mon Jan 23 10:32:36 PST 2012
On Sunday, 22 January 2012 at 14:51:36 UTC, Alex Rønne Petersen
wrote:
> So we started discussing whether a more intuitive syntax could
> be found. Someone suggsted:
>
> template ElementType(T : T[])
> {
> alias T template;
> }
>
> I personally believe this makes it perfectly clear that you're
> aliasing the template itself to T.
>
> Thoughts?
Isn't alias this basically what is happening?
template ElementType(T : T[])
{
alias T this;
}
Aliasing this template to type T? Ok, since multiple alias this
are technically allowed... but still...
More information about the Digitalmars-d
mailing list