I can't find a solution to this one, any suggestions would be welcome.
Say you have a matrix class specialized with storage type and
dimensions:
template<class T, unsigned ROWS, unsigned COLS>
class Matrix() {
...
};
You can overload an operation for multiplication of similar specialized
types:
Matrix<T,ROWS,COLS> operator*(const Matrix<T,ROWS,COLS>& right) const;
but can you think of a way to specialize a global function for
dissimilar types? ie:
Matrix<float, 3, 1> m1, m3;
Matrix<float, 3, 3> m2;
//Initialize operands...
m3 = m2 * m1;
TIA for any suggestions!