Getting the template name of a template instantiation

Nordlöw via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 27 09:40:09 PDT 2016


If I have a template parameter

     E = S!int

where

     struct S(T) { S x; }

how can I extract the template name part `S` from E`?

Something like:

     static assert(is(templateName!(S!int) == S));

Is this already in Phobos somewhere?


More information about the Digitalmars-d-learn mailing list