This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problems with template template parameter
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Alexander Helm <helm at fs dot tum dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 16 Dec 2002 09:40:13 -0600
- Subject: Re: Problems with template template parameter
- References: <3DFCD26A.9060901@fs.tum.de><3DFCD26A.9060901@fs.tum.de>
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 {
public:
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.
--Eljay
PS: Thanks for __PRETTY_FUNCTION__ ... I was not aware of it before!