template IsAFoo(T) { static if (is(T t == Foo!U, U)) { enum IsAFoo = true; } else { enum IsAFoo = false; } }
Can we make Foo a template parameters aswell, here? I tried this template IsA(T, K) { static if (is(T t == K!U, U)) { enum IsA = true; } else { enum IsA = false; } } but it doesn't quite work.