]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Workaround for gcc2.8 bug
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 2 Apr 1998 08:33:37 +0000 (08:33 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 2 Apr 1998 08:33:37 +0000 (08:33 +0000)
git-svn-id: https://svn.dealii.org/trunk@112 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/Todo
deal.II/deal.II/include/dofs/dof_accessor.h

index 55e55269bad016f62625ccb0be148aa7658b8a24..ac4704c4a27886278564beb11240ebf8dbd14a3b 100644 (file)
@@ -39,6 +39,8 @@ Replace function objects by mem_fun, fun_ptr, ... when member function
 implement ProblemBase::distribute_cell_to_dof_vector
 
 
+Remove gcc2.8 workaround with DoFSubstructAccessor
+
 
 
 
index 2ff7959be758a6de8bef77840bd26bb6a792b948..c01fc38f8a10dacc759726bd4367ed78d601bb67 100644 (file)
@@ -298,9 +298,29 @@ class DoFQuadAccessor :  public DoFAccessor<dim>, public BaseClass {
 
 /**
   Intermediate, "typedef"-class, not for public use.
+
+  Rationale for the declaration of members for this class: gcc 2.8 has a bug
+  when deriving from explicitely specialized classes which materializes in
+  the calculation of wrong addresses of member variables. By declaring the
+  general template of #DoFSubstructAccessor# to have the same object layout as
+  the specialized versions (using the same base classes), we fool the compiler,
+  which still looks in the wrong place for the addresses but finds the
+  right information. This way, at least ot works.
+
+  Insert a guard, however, in the constructor to avoid that anyone (including
+  the compiler) happens to use this class.
   */
 template <int dim>
-class DoFSubstructAccessor;
+class DoFSubstructAccessor : public DoFAccessor<dim>,
+                            public TriaAccessor<dim> {
+  public:
+    DoFSubstructAccessor () {
+      Assert (false, ExcInternalError());
+    };
+
+    DeclException0 (ExcInternalError);
+};
+
 
 
 

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.