From 4ad30a73fc8b707bf90b9ec712a12a7f63ae823a Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Tue, 22 Jun 2021 14:31:32 +0000 Subject: Use internal::ref_selector to avoid holding a reference to a RHS expression. --- test/solverbase.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/solverbase.h b/test/solverbase.h index 13c09593a..ba76ba4ee 100644 --- a/test/solverbase.h +++ b/test/solverbase.h @@ -31,6 +31,10 @@ void check_solverbase(const MatrixType& matrix, const SolverType& solver, Index solver_solution2 = RhsType::Random(rows,cols2); solver_solution2 = solver.adjoint().solve(m2); VERIFY_IS_APPROX(m2, matrix.adjoint()*solver_solution2); + // test with temporary expression as rhs + m2 = DstType::Random(cols,cols2); + solver_solution = solver.solve(matrix*m2); + VERIFY_IS_APPROX(matrix*m2, matrix*solver_solution); } #endif // TEST_SOLVERBASE_H -- cgit v1.2.3