diff --git a/matrix/Matrix.hpp b/matrix/Matrix.hpp index 70bcea5ef7..b9c3895197 100644 --- a/matrix/Matrix.hpp +++ b/matrix/Matrix.hpp @@ -355,7 +355,7 @@ public: template Matrix slice(size_t x0, size_t y0) const { - Matrix &self = *this; + const Matrix &self = *this; Matrix res; //default constructed for (size_t i = 0; i < P; i++) { for (size_t j = 0; j < Q; j++) {