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; else alias ElementType = void; } . Very powerful. Is this documented?
Per Nordlöw via Digitalmars-d-learn Thu, 06 Aug 2020 14:55:54 -0700
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; else alias ElementType = void; } . Very powerful. Is this documented?