From 344ea415c712854d4e8e998f24017a5e3f158f1b Mon Sep 17 00:00:00 2001 From: James Benze Date: Thu, 6 Nov 2014 10:14:06 -0500 Subject: [PATCH] Fix typo in fixed_matrix move-assignment The move assignment operator= had an operand of "matrix", which is an undefined type, causing a compile error. Changing the type to "fixed_matrix" solves the problem. Since this is supposed to be a move-assignment operator, I made it take an r-value reference as well, which seems to be the general agreed-upon way to define this operator. This is related to trac bug #10762 --- include/boost/numeric/ublas/matrix.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index d063910..9ec4395 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -1382,9 +1382,9 @@ namespace boost { namespace numeric { // Assignment #ifdef BOOST_UBLAS_MOVE_SEMANTICS - /*! @note "pass by value" the key idea to enable move semantics */ + /*! @note "rvalue-reference" the key idea to enable move semantics */ BOOST_UBLAS_INLINE - fixed_matrix &operator = (matrix m) { + fixed_matrix &operator = (fixed_matrix && m) { assign_temporary(m); return *this; } -- 2.1.3