From: Wolfgang Bangerth Date: Sun, 5 Jul 2009 22:37:04 +0000 (+0000) Subject: Make sure the destructor of a derived class is no loser than that of the base class... X-Git-Tag: v8.0.0~7547 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ce8ca0d8812e62281682f5a7e88772651ce994f;p=dealii.git Make sure the destructor of a derived class is no loser than that of the base class in the exceptions it throws. This otherwise trips off ICC. git-svn-id: https://svn.dealii.org/trunk@19012 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/tria.h b/deal.II/deal.II/include/grid/tria.h index 7a573b3d7c..0c9e26fbcf 100644 --- a/deal.II/deal.II/include/grid/tria.h +++ b/deal.II/deal.II/include/grid/tria.h @@ -1390,6 +1390,19 @@ class Triangulation : public Subscriptor */ struct DistortedCellList : public dealii::ExceptionBase { + /** + * Destructor. Empty, but needed + * for the sake of exception + * specification, since the base + * class has this exception + * specification and the + * automatically generated + * destructor would have a + * different one due to member + * objects. + */ + virtual ~DistortedCellList () throw(); + /** * A list of those cells * among the coarse mesh diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index f7704793a3..4392c3d7fe 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -14525,6 +14525,19 @@ Triangulation::RefinementListener::~RefinementListener () +template +Triangulation::DistortedCellList::~DistortedCellList () throw () +{ + // don't do anything here. the compiler + // will automatically convert any + // exceptions created by the destructors of + // the member variables into abort() in + // order to satisfy the throw() + // specification +} + + + template void Triangulation::