samedi 29 novembre 2014

C++: assignment operator of template class


Vote count:

0




I have this example:


a class of a matrix and the dimension of the matrix is given as template argument



template <std::size_t DIM>
class Matrix{
...

};

main:
Matrix<2> m2 ();
Matrix<4> m4 ();
m2 = m4;


now my question:


what has my assignment operator to look like to change the the DIM of m2 from 2 to 4 ?



asked 59 secs ago







C++: assignment operator of template class

Aucun commentaire:

Enregistrer un commentaire