]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove one of the weirdest workarounds we have for gcc 2.95 in our code base.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 9 Sep 2007 00:39:53 +0000 (00:39 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 9 Sep 2007 00:39:53 +0000 (00:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@15178 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/derivative_approximation.cc

index ea283b1200bca28b74cbfc9011b729c2b3485a8f..cce43642aeb639fcf05d979c34693817681b4680 100644 (file)
@@ -614,31 +614,6 @@ approximate_derivative_tensor (const DH<dim>                                &dof
 
 
 
-#ifdef DEAL_II_FUNPTR_TEMPLATE_TEMPLATE_BUG
-namespace WorkAround
-{
-// gcc 2.95 is not happy if we take the address of a template function as in
-//
-//  DerivativeApproximation::template approximate<DerivativeDescription,dim,DH>
-//
-// if one of the template arguments is a template-template
-// parameter. so work around this problem in a rather unnerving and
-// weird way, but at least it works
-  template <template <int> class DH> struct IsHP
-  {
-      static const bool value = false;
-  };
-  template <template <int> class DH> const bool IsHP<DH>::value;
-
-  template <> struct IsHP<hp::DoFHandler>
-  {
-      static const bool value = true;
-  };
-  const bool IsHP<hp::DoFHandler>::value;  
-}
-#endif
-
-
 template <class DerivativeDescription, int dim,
           template <int> class DH, class InputVector>
 void 
@@ -667,19 +642,13 @@ approximate_derivative (const Mapping<dim>    &mapping,
                           const IndexInterval   &,
                           Vector<float>         &);
 
-#ifdef DEAL_II_FUNPTR_TEMPLATE_TEMPLATE_BUG
-  const FunPtr fun_ptr
-    = (WorkAround::IsHP<DH>::value ?
-       &DerivativeApproximation::template approximate<DerivativeDescription,dim,hp::DoFHandler,InputVector> :
-       &DerivativeApproximation::template approximate<DerivativeDescription,dim,DoFHandler,InputVector>);
-#else
-  const FunPtr fun_ptr
-    = &DerivativeApproximation::template approximate<DerivativeDescription,dim,DH,InputVector>;
-#endif
   for (unsigned int i=0; i<n_threads; ++i)
-    threads += Threads::spawn (fun_ptr)(mapping, dof_handler, solution, component,
-                                        index_intervals[i],
-                                        derivative_norm);
+    threads += Threads::spawn (&DerivativeApproximation::
+                              template approximate<DerivativeDescription,dim,
+                              DH,InputVector>)
+              (mapping, dof_handler, solution, component,
+               index_intervals[i],
+               derivative_norm);
   threads.join_all ();
 }
 

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.