is expression for template structs/classes instances?

d coder dlang.coder at gmail.com
Tue Dec 21 01:54:04 PST 2010


> S!int foo;
> static if ( is( typeof(foo) f == S!T, T ) ) {
>    // Here, T == int, f == typeof(foo)
> }
>
> Note that the syntax "is ( Type Identifier : TypeSpecialization ,
> TemplateParameterList )" is only usable inside static if.
>

Thanks Simen

I do know the template. I will try out your solution. Will let you
know if I face issues.

Regards
- Cherry


More information about the Digitalmars-d-learn mailing list