A different version of the template is a different class, so the data
member can't be accessed directly.
template<typename T, unsigned M, unsigned N>
template<typename U>
template<typename T, unsigned M, unsigned N>
template<typename U>
-inline Matrix<T, M, N>::Matrix(const Matrix<U, M, N> &m)
+inline Matrix<T, M, N>::Matrix(const Matrix<U, M, N> &other)
- std::copy(m.data, m.data+M*N, data);
+ for(unsigned i=0; i<M; ++i)
+ for(unsigned j=0; j<N; ++j)
+ element(i, j) = other(i, j);
}
template<typename T, unsigned M, unsigned N>
}
template<typename T, unsigned M, unsigned N>