Test for self referential templated Class
JAnderson
ask at me.com
Mon Jun 30 23:19:23 PDT 2008
JAnderson wrote:
> 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
There's also typeof(this).
-Joel
More information about the Digitalmars-d
mailing list