Distinguish recursive Templates

Manfred Nowak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 22 15:40:54 PDT 2015


Timon Gehr wrote:

> template getDepth(T){
>      static if(is(T==Set!S,S)) enum getDepth=1+getDepth!S;
>      else enum getDepth=0;
> }

Thx. Seems that I have to relearn a lot.

-manfred


More information about the Digitalmars-d-learn mailing list