How to test templates for equality?

Uranuz via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 5 22:37:54 PDT 2014


Suddenly posted. I don't know why it's happened))

template isMyInstanceOf(alias Templ, alias Inst)
{
     alias Args = ???; //I don't have idea how to get it

     enum bool isMyInstanceOf = __traits(isSame, Templ!(Args), 
Inst);
}

Do you have any idea how to solve this? May be standad library 
could be improved with such type of test for template instance?


More information about the Digitalmars-d-learn mailing list