Skip to content
Snippets Groups Projects
Unverified Commit ec504851 authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

do not catch polymorphic type by value

parent 14b20ebd
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,12 @@ namespace Dune {
p_.resize(r_.size());
}
template<typename P>
void setPreconditioner(P&& preconditioner)
{
preconditioner_ = wrap_own_share<Preconditioner>(std::forward<P>(preconditioner));
}
void check() const override;
void preprocess() override;
void iterate() override;
......
......@@ -266,7 +266,7 @@ int main() try
return 1;
return 0;
} catch(Dune::Exception e) {
} catch(const Dune::Exception& e) {
std::cout << e << std::endl;
return 1;
} catch(...) {
......
......@@ -188,7 +188,7 @@ bool checkResize() try {
DUNE_THROW(Exception, "Resize yields unexpected vector size.");
std::cout << "passed" << std::endl;
return true;
} catch(Dune::Exception e) {
} catch(const Dune::Exception& e) {
std::cout << " FAILED." << std::endl;
std::cout << "Exception was: " << e << std::endl;
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment