Test for self referential templated Class

JAnderson ask at me.com
Mon Jun 30 23:17:27 PDT 2008


Manfred Nowak wrote:
> janderson wrote:
> 
>> You need a stopping condition like 
>> template specialization or an static if.
> 
> ... but if this is true, then I have to implement a stopping condition 
> or a static if for _every possible_ actual type ( int, uint, ...)---and 
> the generic achievenment is lost.
> 
> -manfred 
> 

ic,

What about calling another template?

class A(T){
   ...
}

class C(T){
   pragma( msg, Format!(is(T:C!(A!(int)))));
}

Although I'm not exactly sure what your trying to do.



-Joel



More information about the Digitalmars-d mailing list