From: Mikko Rasa Date: Sat, 18 May 2013 18:31:41 +0000 (+0300) Subject: Fix Matrix template copy constructor X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=03f70f6ba9622bb2840a14fc50ac72201cc533b5;p=libs%2Fmath.git Fix Matrix template copy constructor A different version of the template is a different class, so the data member can't be accessed directly. --- diff --git a/source/linal/matrix.h b/source/linal/matrix.h index ff73165..83a64f5 100644 --- a/source/linal/matrix.h +++ b/source/linal/matrix.h @@ -54,9 +54,11 @@ inline Matrix::Matrix(const T *d) template template -inline Matrix::Matrix(const Matrix &m) +inline Matrix::Matrix(const Matrix &other) { - std::copy(m.data, m.data+M*N, data); + for(unsigned i=0; i