I just discovered an alternative use of the `in`-operator

Per Nordlöw per.nordlow at gmail.com
Thu Aug 6 21:50:06 UTC 2020

I just discovered that the is-operator can be used as in

template ElementType(R)
     static if (is(typeof(R.init.front.init) T))
         alias ElementType = T;
         alias ElementType = void;

. Very powerful. Is this documented?

More information about the Digitalmars-d-learn mailing list