Test for self referential templated Class
Robert Fraser
fraserofthenight at gmail.com
Mon Jun 30 01:11:27 PDT 2008
Manfred_Nowak wrote:
> Koroskin Denis wrote:
>
>> Use tango.core.Variant.isAtomicType!(T) template to test against
>> builtin types.
>
> .. this does not help for user defined types.
>
> One seem's to need something like
>
> class C(T){
> //...
> !is( T == C!( ... ))
>
> But this casts one into infinite recursion.
>
> -manfred
Make it derive from a (non-templated) interface and test for that.
More information about the Digitalmars-d
mailing list