Getting the template name of a template instantiation
Nordlöw via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jun 27 13:05:36 PDT 2016
On Monday, 27 June 2016 at 17:17:19 UTC, John wrote:
>> import std.traits;
>> __traits(identifier, TemplateOf!(S!int));
>
> Scratch that, this is what you want:
>
> import std.traits;
> static assert(__traits(isSame, TemplateOf!(S!int), S));
I believe this is what
import std.traits : isInstanceOf;
is for.
Thanks! I found both useful.
More information about the Digitalmars-d-learn
mailing list