On Sunday, 23 June 2013 at 00:18:23 UTC, Timothee Cour wrote:
On Sat, Jun 22, 2013 at 5:07 PM, anonymous
<[email protected]> wrote:
[...]
template getTemplate(alias T : TI!TP, alias TI, TP...)
{
alias getTemplate = TI;
}
did you test it? doesn't work for me:
auto fun(T)(T x){return x;}
pragma(msg,__LINE__,":",getTemplate!(fun!double));
Error: template instance getTemplate!(fun) does not match
template
declaration getTemplate(alias T : TI!(TP), alias TI, TP...)
Oh, sorry. I had tested it with generic templates and assumed it
would work with everything that's not a type. No ideas on how to
make it work with function templates then.