On Saturday, 25 May 2013 at 12:13:42 UTC, Ahuzhgairl wrote:
Uneditable newsgroups. Simplest case.

struct Bar(T) {}

struct Foo(T : A(B), A, B) {
    static void f() {}
}

void main() {
    Foo!(Bar!(int)).f();
}

Two problems with that:

1. A(B) should be A!(B)
2. A won't bind to Bar because Bar is not a type, it is a template. A should be an alias.

This works:

struct Bar(T) {}

struct Foo(T : A!(B), alias A, B) {
    static void f() {}
}

void main() {
    Foo!(Bar!(int)).f();
}

Reply via email to