Skip to content

Catch polymorphic exceptions by reference

Oliver Sander requested to merge catch-polymorphic-exception-by-reference into master

g++-8 warns about this, e.g.,

/home/sander/dune-book/code/dune-pdelab/dune/pdelab/newton/newton.hh:672:14: warning: catching polymorphic type ‘class Dune::PDELab::NewtonDefectError’ by value [-Wcatch-value=]
          catch (NewtonDefectError)
          ^~~~~
Edited by Oliver Sander

Merge request reports

Loading