On Wednesday, 23 September 2020 at 18:50:28 UTC, H. S. Teoh wrote:
Try this:interface I {} class C : I {} class D {} struct S {} pragma(msg, is(C : I)); // true pragma(msg, is(D : I)); // false pragma(msg, is(S : I)); // false So probably what you want is something like this: void register(C, ARGS...)(ARGS args) if (behavesLikeFoo!C || is(C : IFoo)) ... T
Yes, that's it. Thanks :)