On Monday, 4 January 2021 at 09:18:50 UTC, Ola Fosheim Grøstad wrote:
On Monday, 4 January 2021 at 05:55:37 UTC, Ola Fosheim Grostad wrote:
On Monday, 4 January 2021 at 04:37:22 UTC, 9il wrote:
I suppose the answer would be that D doesn't pretend to support all C++ template features and the bug is not a bug because we live with this somehow for years.

But it is a bug even if there was no C++... An alias should work by simple substitution, if it does not, then it is no alias...

Here is an even simpler example that does not work:

struct Foo(T){}
void foo(T)(T!int x) {}

alias FooInt = Foo!int;

void main() {
    foo(FooInt());
}

Oh, now wait, it does:

struct Foo(T){}
void foo(alias T)(T!int x) {}
alias FooInt = Foo!int;

void main() {
    foo(FooInt());
}

My mistake.






Reply via email to