diff --git a/include/armadillo_bits/fn_accu.hpp b/include/armadillo_bits/fn_accu.hpp index 9a3cec42..1354d942 100644 --- a/include/armadillo_bits/fn_accu.hpp +++ b/include/armadillo_bits/fn_accu.hpp @@ -840,7 +840,7 @@ accu(const BaseCube& X) if(is_Cube::stored_type>::value) { - unwrap_cube::stored_type> tmp(P.Q); + const unwrap_cube::stored_type> tmp(P.Q); return arrayops::accumulate(tmp.M.memptr(), tmp.M.n_elem); }