]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make sure the destructor of a derived class is no loser than that of the base class...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 5 Jul 2009 22:37:04 +0000 (22:37 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 5 Jul 2009 22:37:04 +0000 (22:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@19012 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria.h
deal.II/deal.II/source/grid/tria.cc

index 7a573b3d7ca2d307d947193595821263007e3105..0c9e26fbcf7943016f36a13950c7881677173dcc 100644 (file)
@@ -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
index f7704793a3d87d3e7c60edb7254898d1641a1013..4392c3d7fe4a979060ab2764ff5b8e12056bc02e 100644 (file)
@@ -14525,6 +14525,19 @@ Triangulation<dim, spacedim>::RefinementListener::~RefinementListener ()
 
 
 
+template<int dim, int spacedim>
+Triangulation<dim, spacedim>::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<int dim, int spacedim>
 void Triangulation<dim, spacedim>::

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.