Skip to content
Snippets Groups Projects
Commit 4acfda14 authored by Markus Blatt's avatar Markus Blatt
Browse files

[Bugfix] Prevent implicite conversion Matrix->MatrixAdapter.

MatrixAdapter uses a const reference to store a reference
to the matrix it is working on. Without this patch it was
possible to pass the matrix to constructor actually taking
a MatrixAdapter as its argument. This resulted in a const
reference to a temporary MatrixAdapter that died after the
constructor call.

This patch request explicitly calling the constructor and
thus fixes this issue.
parent 3fa0b76d
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,7 @@ namespace Dune {
enum {category=SolverCategory::sequential};
//! constructor: just store a reference to a matrix
MatrixAdapter (const M& A) : _A_(A) {}
explicit MatrixAdapter (const M& A) : _A_(A) {}
//! apply operator to x: \f$ y = A(x) \f$
virtual void apply (const X& x, Y& y) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment