How can I get the scalar type of a pointer to pointer (and in even deeper levels)
rempas
rempas at tutanota.com
Sat Mar 11 13:22:03 UTC 2023
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...
More information about the Digitalmars-d-learn
mailing list