Test for self referential templated Class

Koroskin Denis 2korden at gmail.com
Mon Jun 30 00:28:17 PDT 2008


On Mon, 30 Jun 2008 10:53:34 +0400, Manfred Nowak <svv1999 at hotmail.com>  
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
>

Use tango.core.Variant.isAtomicType!(T) template to test against builtin  
types.



More information about the Digitalmars-d mailing list