Does D support member function template?

Li Jie cpunion at gmail.com
Thu Apr 13 19:31:31 PDT 2006


I write a matrix class:

# class Matrix(T, int R, int C) {
#   //...
# }

How to write the opMul? It uses like this:

# Matrix!(int, 3, 4) m1;
# Matrix!(int, 4, 8) m2;
# Matrix!(int, 3, 8) m3 = m1 * m2;

Thanks,

- Li Jie





More information about the Digitalmars-d-learn mailing list