On 11.03.23 14:22, rempas wrote:
On Saturday, 11 March 2023 at 12:59:59 UTC, ag0aep6g wrote:

alias Foo(T : U*, U) = Foo!U;
alias Foo(T) = T;
static assert(is(Foo!(int*) == int));
static assert(is(Foo!(int**) == int));
static assert(is(Foo!(int***) == int));
static assert(is(Foo!(int****) == int));

Wait, but "Foo" is defined twice and it doesn't let me compile...

You're doing something wrong then.

Don't put the Foo declarations in a function or unittest.

Reply via email to