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

Merge branch 'do-not-catch-polymorphic-type-by-value' into 'master'

do not catch polymorphic type by value

See merge request !28
parents e42be9e6 ec504851
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,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