On Thursday, 1 September 2016 at 08:46:07 UTC, Stefan Koch wrote:
On Thursday, 1 September 2016 at 08:44:38 UTC, Stefan Koch wrote:void f(T)(T t) { static if (is(fImpl(t) == void)) { f(t); } else { // default impl here } }Was meant to be void f(T)(T t) { static if (is(fImpl(t) == void)) { fImpl(t); } else { // default impl here } }
why not: static if (__traits(compiles, fImpl(t))) ? Andrea