Problems with template template parameter

Eljay Love-Jensen
Mon Dec 16 07:52:00 GMT 2002

Hi Alexander,

Hmmm, Oliver must be on to something there!  The intricacies of templates.

Is this an option for your problem domain...

template<int rows, int cols>
class Matrix {
     Matrix() {
         cout << __PRETTY_FUNCTION__ << endl;

     template<int cols2>
     Matrix<rows, cols2>* operator * (Matrix<cols, cols2>& lhs) {
         cout << __PRETTY_FUNCTION__ << endl;


Gets rid of having a Matrix_Base, which avoids the specialization issue you 
bumped into.


PS:  Thanks for __PRETTY_FUNCTION__ ... I was not aware of it before!

More information about the Gcc-help mailing list