D's limited template specialization abilities compared to C++

Ahuzhgairl bulletproofchest at gmail.com
Sat May 25 05:04:44 PDT 2013


No,




struct Foo(T) {
     static void f() { writeln("general"); }
}

struct Foo(T : A(B).alias C, A, B, C) {
     static void f() { writeln("special"); }
}

struct Bar(T) {
     struct Baz {}
}

struct Baz(T : A(B), A, B) {
}

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


More information about the Digitalmars-d mailing list