From 344ea415c712854d4e8e998f24017a5e3f158f1b Mon Sep 17 00:00:00 2001
From: James Benze <jabenze@berriehill.com>
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
|
b
|
namespace boost { namespace numeric {
|
1382 | 1382 | // Assignment |
1383 | 1383 | #ifdef BOOST_UBLAS_MOVE_SEMANTICS |
1384 | 1384 | |
1385 | | /*! @note "pass by value" the key idea to enable move semantics */ |
| 1385 | /*! @note "rvalue-reference" the key idea to enable move semantics */ |
1386 | 1386 | BOOST_UBLAS_INLINE |
1387 | | fixed_matrix &operator = (matrix m) { |
| 1387 | fixed_matrix &operator = (fixed_matrix && m) { |
1388 | 1388 | assign_temporary(m); |
1389 | 1389 | return *this; |
1390 | 1390 | } |