feature request: __traits(getTemplate, A!T) => A; __traits(getTemplateArguments, A!(T,"foo")) => (T,"foo")

anonymous anonymous at example.com
Sat Jun 22 17:07:44 PDT 2013


On Saturday, 22 June 2013 at 23:57:17 UTC, Timothee Cour wrote:
> template getTemplate(T : TI!TP, alias TI, TP...)
> {
> alias getTemplate = TI;
> }
>
>
> however, indeed seems to work with types only, not functions.

Just add another overload (is that the correct term?) with alias 
T:

template getTemplate(alias T : TI!TP, alias TI, TP...)
{
alias getTemplate = TI;
}


More information about the Digitalmars-d mailing list