January 13, 2004 Value template parameters (BUG maybe) | ||||
---|---|---|---|---|
| ||||
Hi everyone I'm trying to port my matrix class from C++ to D. The C++ Class makes heavy use of templates and I want to do it the same way in D. Why DOES the following code compile? template mat(int ROWS, int COLS) { struct matrix { float items[ROWS * COLS]; } } void foo(mat!(4,4).matrix x) { } int main ( char [] [] args ) { mat!(5,6).matrix a; foo(a);// Should NOT work because the type of the // paramter x is mat!(4,4).matrix return 0; } Cheers Tobias |
January 14, 2004 Re: Value template parameters (BUG maybe) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tobias Neukom | It looks like a bug. -Walter |
Copyright © 1999-2021 by the D Language Foundation