From 2ce8ca0d8812e62281682f5a7e88772651ce994f Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 5 Jul 2009 22:37:04 +0000 Subject: [PATCH] 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 --- deal.II/deal.II/include/grid/tria.h | 13 +++++++++++++ deal.II/deal.II/source/grid/tria.cc | 13 +++++++++++++ 2 files changed, 26 insertions(+) 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:: -- 2.39.5