//no way to re-parameter a template a class when in some special scope class base(alias D) { alias D!(int) special ;//error,D is not a template class //so function like this can't pass complie auto change(T:long)() { return new special();//for example change devide!int to devide!long } } class devide(T:int):base!(devide) //i think maybe because here: devide = devide!(T) { } int main(char[][]) { return 0; }
there are some different?i am not sure class A(alias T) { } and class B(T) { } //i think if there are different,can be solve the question i mentioned class D(P):A!D //base class is a type of A!(D),D is a symbol { } class D(P):B!D //base class instance is a type of B!(D!(P)) { }