]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Umph. Undo last check-in, since it is formally correct yet leads to an ICE in gcc...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 7 Jan 2003 21:26:55 +0000 (21:26 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 7 Jan 2003 21:26:55 +0000 (21:26 +0000)
git-svn-id: https://svn.dealii.org/trunk@6882 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/base/include/base/config.h.in
deal.II/base/include/base/thread_management.h
deal.II/configure.in

index 0d980d74a0b816bdac149a2b54969a7d46fe830e..1d71d3387e1997c417fe2db77b7de7e26e61935b 100644 (file)
@@ -1908,6 +1908,124 @@ template class X<1,int>;
 
 
 
+dnl -------------------------------------------------------------
+dnl Intel's ICC 5.0.1 compiler has the following problem: it won't
+dnl compile this code:
+dnl ---------------------------------
+dnl template <class Class> void encapsulate (void (Class::*fun_ptr)());
+dnl struct X {
+dnl  void bar () const;
+dnl };
+dnl void foo () {
+dnl   encapsulate(&X::bar);
+dnl };
+dnl ---------------------------------
+dnl It complains about not finding an instance for the encapsulate function.
+dnl The problem is due to the fact that the function we take the address of
+dnl is constant, i.e. it should match the template with Class="const X",
+dnl but apparently doesn't. Unfortunately, we rely on such code in the
+dnl Threads mechanisms. So detect this bug and if present work around it
+dnl by providing a second set of encapsulate functions for constant 
+dnl functions.
+dnl
+dnl Usage: DEAL_II_CHECK_TEMPL_CONST_MEM_PTR_BUG
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_TEMPL_CONST_MEM_PTR_BUG, dnl
+[
+  AC_MSG_CHECKING(for templates and pointers to const member functions bug)
+  AC_LANG(C++)
+  CXXFLAGS="$CXXFLAGSG"
+  AC_TRY_COMPILE(
+    [
+       template <class Class> void encapsulate (void (Class::*fun_ptr)());
+
+       struct X {
+         void bar () const;
+       };
+
+       void foo () {
+         encapsulate(&X::bar);
+       };
+    ],
+    [],
+    [
+      AC_MSG_RESULT(no)
+    ],
+    [
+      AC_MSG_RESULT(yes. using workaround)
+      AC_DEFINE(DEAL_II_TEMPL_CONST_MEM_PTR_BUG, 1, 
+                     [Define if we have to work around a bug in Intel's icc
+                      compiler in which the compiler refuses to consider a
+                      template when given a pointer to a constant member function.
+                      See the aclocal.m4 file in the top-level directory
+                      for a description of this bug.])
+    ])
+])
+
+
+
+dnl -------------------------------------------------------------
+dnl More Intel ICC 5.0.1 compiler lossage with pointers to constant
+dnl member functions
+dnl ---------------------------------
+dnl template <class Class> struct Y {
+dnl   typedef void (Class::*FunPtr) ();
+dnl   FunPtr fun_ptr;
+dnl   Class *object;
+dnl   void foo () {
+dnl     (object->*fun_ptr)();
+dnl   };
+dnl };
+dnl
+dnl struct X {};
+dnl
+dnl template class Y<const X>;
+dnl ---------------------------------
+dnl Again, it does not store the information that the member function pointer
+dnl refers to a constant object, so complains that the object is constant,
+dnl but the member function is not.
+dnl
+dnl Usage: DEAL_II_CHECK_CONST_MEM_FUN_PTR_BUG
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_CONST_MEM_FUN_PTR_BUG, dnl
+[
+  AC_MSG_CHECKING(for const member function pointers bug)
+  AC_LANG(C++)
+  CXXFLAGS="$CXXFLAGSG"
+  AC_TRY_COMPILE(
+    [
+       template <class Class> struct Y {
+         typedef void (Class::*FunPtr) ();
+         FunPtr fun_ptr;
+         Class *object;
+         void foo () {
+           (object->*fun_ptr)();
+         };
+       };
+
+       struct X {};
+
+       template class Y<const X>;
+    ],
+    [],
+    [
+      AC_MSG_RESULT(no)
+    ],
+    [
+      AC_MSG_RESULT(yes. using workaround)
+      AC_DEFINE(DEAL_II_CONST_MEM_FUN_PTR_BUG, 1, 
+                     [Define if we have to work around another bug in Intel's icc
+                      compiler in which the compiler refuses to store the const
+                      attribute at a member function pointer with a constant class.
+                      See the aclocal.m4 file in the top-level directory
+                      for a description of this bug.])
+    ])
+])
+
+
+
 dnl -------------------------------------------------------------
 dnl DEC/Compaq's cxx compiler does not want us to implement
 dnl virtual functions that were declared abstract before. We do
index bb0faf61db5e484d3c6b0998f11395d22448e42e..e9bf8556f5b296dae5b42c188610a162b232df02 100644 (file)
@@ -5,7 +5,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2001, 2002 by the deal.II authors
+//    Copyright (C) 2001, 2002, 2003 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
    */
 #undef DEAL_II_COMPAT_MAPPING
 
+/* Define if we have to work around another bug in Intel's icc compiler in
+   which the compiler refuses to store the const attribute at a member
+   function pointer with a constant class. See the aclocal.m4 file in the
+   top-level directory for a description of this bug. */
+#undef DEAL_II_CONST_MEM_FUN_PTR_BUG
+
 /* Flag indicating whether the library shall be compiled to use the Tecplot
    interface */
 #undef DEAL_II_HAVE_TECPLOT
    the top-level directory. */
 #undef DEAL_II_TEMPLATE_TEMPLATE_TYPEDEF_BUG
 
+/* Define if we have to work around a bug in Intel's icc compiler in which the
+   compiler refuses to consider a template when given a pointer to a constant
+   member function. See the aclocal.m4 file in the top-level directory for a
+   description of this bug. */
+#undef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
+
 /* Define if we have to work around a bug with some compilers that will not
    allow us to specify a fully specialized class of a template as a friend.
    See the aclocal.m4 file in the top-level directory for a description of
index d7f593361971b999f047124e8a9662e46ee8ed76..d091a3910598661c194e655b80918cb16124b614 100644 (file)
@@ -412,17 +412,21 @@ namespace Threads
       typedef RetType (Class::*type) ();
   };
 
+#ifdef DEAL_II_CONST_MEM_FUN_PTR_BUG
                                   /**
                                    * Same as above, but for the case
                                    * of a member function marked
-                                   * @p{const}.
+                                   * @p{const}. This should not
+                                   * really be necessary, but Intel's
+                                   * compiler has a bug here so we
+                                   * have to work around.
                                    */
   template <class Class, class RetType>
   struct MemFunPtr0<const Class, RetType>
   {
       typedef RetType (Class::*type) () const;
   };
-
+#endif  
                                   /**
                                    * Given a class, argument types,
                                    * and the return type, generate a
@@ -435,17 +439,21 @@ namespace Threads
       typedef RetType (Class::*type) (Arg1);
   };
 
+#ifdef DEAL_II_CONST_MEM_FUN_PTR_BUG
                                   /**
                                    * Same as above, but for the case
                                    * of a member function marked
-                                   * @p{const}.
+                                   * @p{const}. This should not
+                                   * really be necessary, but Intel's
+                                   * compiler has a bug here so we
+                                   * have to work around.
                                    */
   template <class Class, class Arg1, class RetType>
   struct MemFunPtr1<const Class, Arg1, RetType>
   {
       typedef RetType (Class::*type) (Arg1) const;
   };
-
+#endif  
                                   /**
                                    * Given a class, argument types,
                                    * and the return type, generate a
@@ -458,17 +466,21 @@ namespace Threads
       typedef RetType (Class::*type) (Arg1, Arg2);
   };
 
+#ifdef DEAL_II_CONST_MEM_FUN_PTR_BUG
                                   /**
                                    * Same as above, but for the case
                                    * of a member function marked
-                                   * @p{const}.
+                                   * @p{const}. This should not
+                                   * really be necessary, but Intel's
+                                   * compiler has a bug here so we
+                                   * have to work around.
                                    */
   template <class Class, class Arg1, class Arg2, class RetType>
   struct MemFunPtr2<const Class, Arg1, Arg2, RetType>
   {
       typedef RetType (Class::*type) (Arg1, Arg2) const;
   };
-
+#endif  
 
                                   /**
                                    * Given a class, argument types,
@@ -482,17 +494,21 @@ namespace Threads
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3);
   };
 
+#ifdef DEAL_II_CONST_MEM_FUN_PTR_BUG
                                   /**
                                    * Same as above, but for the case
                                    * of a member function marked
-                                   * @p{const}.
+                                   * @p{const}. This should not
+                                   * really be necessary, but Intel's
+                                   * compiler has a bug here so we
+                                   * have to work around.
                                    */
   template <class Class, class Arg1, class Arg2, class Arg3, class RetType>
   struct MemFunPtr3<const Class, Arg1, Arg2, Arg3, RetType>
   {
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3) const;
   };
-
+#endif  
 
                                   /**
                                    * Given a class, argument types,
@@ -506,17 +522,21 @@ namespace Threads
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4);
   };
 
+#ifdef DEAL_II_CONST_MEM_FUN_PTR_BUG
                                   /**
                                    * Same as above, but for the case
                                    * of a member function marked
-                                   * @p{const}.
+                                   * @p{const}. This should not
+                                   * really be necessary, but Intel's
+                                   * compiler has a bug here so we
+                                   * have to work around.
                                    */
   template <class Class, class Arg1, class Arg2, class Arg3, class Arg4, class RetType>
   struct MemFunPtr4<const Class, Arg1, Arg2, Arg3, Arg4, RetType>
   {
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4) const;
   };
-
+#endif  
 
                                   /**
                                    * Given a class, argument types,
@@ -530,17 +550,21 @@ namespace Threads
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5);
   };
 
+#ifdef DEAL_II_CONST_MEM_FUN_PTR_BUG
                                   /**
                                    * Same as above, but for the case
                                    * of a member function marked
-                                   * @p{const}.
+                                   * @p{const}. This should not
+                                   * really be necessary, but Intel's
+                                   * compiler has a bug here so we
+                                   * have to work around.
                                    */
   template <class Class, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class RetType>
   struct MemFunPtr5<const Class, Arg1, Arg2, Arg3, Arg4, Arg5, RetType>
   {
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5) const;
   };
-
+#endif  
 
                                   /**
                                    * Given a class, argument types,
@@ -554,17 +578,21 @@ namespace Threads
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6);
   };
 
+#ifdef DEAL_II_CONST_MEM_FUN_PTR_BUG
                                   /**
                                    * Same as above, but for the case
                                    * of a member function marked
-                                   * @p{const}.
+                                   * @p{const}. This should not
+                                   * really be necessary, but Intel's
+                                   * compiler has a bug here so we
+                                   * have to work around.
                                    */
   template <class Class, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class RetType>
   struct MemFunPtr6<const Class, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, RetType>
   {
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const;
   };
-
+#endif  
 
                                   /**
                                    * Given a class, argument types,
@@ -578,17 +606,21 @@ namespace Threads
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7);
   };
 
+#ifdef DEAL_II_CONST_MEM_FUN_PTR_BUG
                                   /**
                                    * Same as above, but for the case
                                    * of a member function marked
-                                   * @p{const}.
+                                   * @p{const}. This should not
+                                   * really be necessary, but Intel's
+                                   * compiler has a bug here so we
+                                   * have to work around.
                                    */
   template <class Class, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class RetType>
   struct MemFunPtr7<const Class, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, RetType>
   {
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const;
   };
-
+#endif  
 
 
                                   /**
@@ -603,17 +635,21 @@ namespace Threads
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8);
   };
 
+#ifdef DEAL_II_CONST_MEM_FUN_PTR_BUG
                                   /**
                                    * Same as above, but for the case
                                    * of a member function marked
-                                   * @p{const}.
+                                   * @p{const}. This should not
+                                   * really be necessary, but Intel's
+                                   * compiler has a bug here so we
+                                   * have to work around.
                                    */
   template <class Class, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class RetType>
   struct MemFunPtr8<const Class, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, RetType>
   {
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const;
   };
-
+#endif  
 
 
 
@@ -629,17 +665,21 @@ namespace Threads
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9);
   };
 
+#ifdef DEAL_II_CONST_MEM_FUN_PTR_BUG
                                   /**
                                    * Same as above, but for the case
                                    * of a member function marked
-                                   * @p{const}.
+                                   * @p{const}. This should not
+                                   * really be necessary, but Intel's
+                                   * compiler has a bug here so we
+                                   * have to work around.
                                    */
   template <class Class, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class RetType>
   struct MemFunPtr9<const Class, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, RetType>
   {
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9) const;
   };
-
+#endif  
 
   
 
@@ -656,17 +696,21 @@ namespace Threads
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10);
   };
 
+#ifdef DEAL_II_CONST_MEM_FUN_PTR_BUG
                                   /**
                                    * Same as above, but for the case
                                    * of a member function marked
-                                   * @p{const}.
+                                   * @p{const}. This should not
+                                   * really be necessary, but Intel's
+                                   * compiler has a bug here so we
+                                   * have to work around.
                                    */
   template <class Class, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5, class Arg6, class Arg7, class Arg8, class Arg9, class Arg10, class RetType>
   struct MemFunPtr10<const Class, Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10, RetType>
   {
       typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10) const;
   };
-
+#endif  
 
   
   
@@ -2308,10 +2352,12 @@ namespace Threads
       typename MemFunData0<Class_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)());
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
       template <class Class_>
       friend
       typename MemFunData0<const Class_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)() const);
+#endif
   };
 
 
@@ -2448,10 +2494,12 @@ namespace Threads
       typename MemFunData1<Class_,Arg1_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
       template <class Class_, typename Arg1_>
       friend
       typename MemFunData1<const Class_,Arg1_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_) const);
+#endif
   };
 
 
@@ -2592,10 +2640,12 @@ namespace Threads
       typename MemFunData2<Class_,Arg1_,Arg2_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
       template <class Class_, typename Arg1_, typename Arg2_>
       friend
       typename MemFunData2<const Class_,Arg1_,Arg2_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_) const);
+#endif
   };
 
   
@@ -2739,10 +2789,12 @@ namespace Threads
       typename MemFunData3<Class_,Arg1_,Arg2_,Arg3_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_,Arg2_,Arg3_));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
       template <class Class_, typename Arg1_, typename Arg2_, typename Arg3_>
       friend 
       typename MemFunData3<const Class_,Arg1_,Arg2_,Arg3_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_,Arg2_,Arg3_) const);
+#endif
   };
 
 
@@ -2890,10 +2942,12 @@ namespace Threads
       typename MemFunData4<Class_,Arg1_,Arg2_,Arg3_,Arg4_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_, Arg4_));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
       template <class Class_, typename Arg1_, typename Arg2_, typename Arg3_, typename Arg4_>
       friend
       typename MemFunData4<const Class_,Arg1_,Arg2_,Arg3_,Arg4_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_, Arg4_) const);
+#endif  
 };
 
 
@@ -3046,11 +3100,13 @@ namespace Threads
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_,
                                           Arg4_, Arg5_));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
       template <class Class_, typename Arg1_, typename Arg2_, typename Arg3_, typename Arg4_, typename Arg5_>
       friend 
       typename MemFunData5<const Class_,Arg1_,Arg2_,Arg3_,Arg4_,Arg5_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_,
                                           Arg4_, Arg5_) const);
+#endif
   };
   
 
@@ -3207,11 +3263,13 @@ namespace Threads
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_,
                                           Arg4_, Arg5_, Arg6_));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
       template <class Class_, typename Arg1_, typename Arg2_, typename Arg3_, typename Arg4_, typename Arg5_, typename Arg6_>
       friend 
       typename MemFunData6<const Class_,Arg1_,Arg2_,Arg3_,Arg4_,Arg5_,Arg6_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_,
                                           Arg4_, Arg5_, Arg6_) const);
+#endif  
   };
 
 
@@ -3372,11 +3430,13 @@ namespace Threads
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_,
                                           Arg4_, Arg5_, Arg6_, Arg7_));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
       template <class Class_, typename Arg1_, typename Arg2_, typename Arg3_, typename Arg4_, typename Arg5_, typename Arg6_, typename Arg7_>
       friend 
       typename MemFunData7<const Class_,Arg1_,Arg2_,Arg3_,Arg4_,Arg5_,Arg6_,Arg7_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_,
                                           Arg4_, Arg5_, Arg6_, Arg7_) const);
+#endif
   };
   
   
@@ -3541,12 +3601,14 @@ namespace Threads
                                           Arg4_, Arg5_, Arg6_,
                                           Arg7_, Arg8_));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
       template <class Class_, typename Arg1_, typename Arg2_, typename Arg3_, typename Arg4_, typename Arg5_, typename Arg6_, typename Arg7_, typename Arg8_>
       friend 
       typename MemFunData8<const Class_,Arg1_,Arg2_,Arg3_,Arg4_,Arg5_,Arg6_,Arg7_,Arg8_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_,
                                           Arg4_, Arg5_, Arg6_,
                                           Arg7_, Arg8_) const);
+#endif
   };
   
   
@@ -3715,12 +3777,14 @@ namespace Threads
                                           Arg4_, Arg5_, Arg6_,
                                           Arg7_, Arg8_, Arg9_));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
       template <class Class_, typename Arg1_, typename Arg2_, typename Arg3_, typename Arg4_, typename Arg5_, typename Arg6_, typename Arg7_, typename Arg8_, typename Arg9_>
       friend 
       typename MemFunData9<const Class_,Arg1_,Arg2_,Arg3_,Arg4_,Arg5_,Arg6_,Arg7_,Arg8_,Arg9_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_,
                                           Arg4_, Arg5_, Arg6_,
                                           Arg7_, Arg8_, Arg9_) const);
+#endif
   };
   
   
@@ -3893,12 +3957,14 @@ namespace Threads
                                           Arg4_, Arg5_, Arg6_,
                                           Arg7_, Arg8_, Arg9_, Arg10_));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
       template <class Class_, typename Arg1_, typename Arg2_, typename Arg3_, typename Arg4_, typename Arg5_, typename Arg6_, typename Arg7_, typename Arg8_, typename Arg9_, typename Arg10_>
       friend 
       typename MemFunData10<const Class_,Arg1_,Arg2_,Arg3_,Arg4_,Arg5_,Arg6_,Arg7_,Arg8_,Arg9_,Arg10_,void>::ArgCollector
       encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_,
                                           Arg4_, Arg5_, Arg6_,
                                           Arg7_, Arg8_, Arg9_, Arg10_) const);
+#endif
   };
   
   
@@ -4106,15 +4172,23 @@ namespace Threads
   typename MemFunData0<Class,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)());
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
                                    /**
                                    * Same as the previous function,
                                    * but for member functions marked
-                                   * @p{const}.
+                                   * @p{const}. This function should
+                                   * not be necessary, since the
+                                   * compiler should deduce a
+                                   * constant class as template
+                                   * argument, but we have to work
+                                   * around a bug in Intel's icc
+                                   * compiler with this.  
                                     */
   template <class Class>
   inline
   typename MemFunData0<const Class,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)() const);
+#endif
  
                                   /**
                                    * Encapsulate a member function
@@ -4133,15 +4207,23 @@ namespace Threads
   typename MemFunData1<Class,Arg1,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
                                    /**
                                    * Same as the previous function,
                                    * but for member functions marked
-                                   * @p{const}.
+                                   * @p{const}. This function should
+                                   * not be necessary, since the
+                                   * compiler should deduce a
+                                   * constant class as template
+                                   * argument, but we have to work
+                                   * around a bug in Intel's icc
+                                   * compiler with this.  
                                     */
   template <class Class, typename Arg1>
   inline
   typename MemFunData1<const Class,Arg1,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1) const);
+#endif
  
 
                                   /**
@@ -4161,15 +4243,23 @@ namespace Threads
   typename MemFunData2<Class,Arg1,Arg2,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
                                    /**
                                    * Same as the previous function,
                                    * but for member functions marked
-                                   * @p{const}.
+                                   * @p{const}. This function should
+                                   * not be necessary, since the
+                                   * compiler should deduce a
+                                   * constant class as template
+                                   * argument, but we have to work
+                                   * around a bug in Intel's icc
+                                   * compiler with this.  
                                     */
   template <class Class, typename Arg1, typename Arg2>
   inline
   typename MemFunData2<const Class,Arg1,Arg2,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2) const);
+#endif
    
 
                                   /**
@@ -4189,15 +4279,23 @@ namespace Threads
   typename MemFunData3<Class,Arg1,Arg2,Arg3,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
                                    /**
                                    * Same as the previous function,
                                    * but for member functions marked
-                                   * @p{const}.
+                                   * @p{const}. This function should
+                                   * not be necessary, since the
+                                   * compiler should deduce a
+                                   * constant class as template
+                                   * argument, but we have to work
+                                   * around a bug in Intel's icc
+                                   * compiler with this.  
                                     */
   template <class Class, typename Arg1, typename Arg2, typename Arg3>
   inline
   typename MemFunData3<const Class,Arg1,Arg2,Arg3,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3) const);
+#endif
    
 
                                   /**
@@ -4217,15 +4315,23 @@ namespace Threads
   typename MemFunData4<Class,Arg1,Arg2,Arg3,Arg4,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
                                    /**
                                    * Same as the previous function,
                                    * but for member functions marked
-                                   * @p{const}.
+                                   * @p{const}. This function should
+                                   * not be necessary, since the
+                                   * compiler should deduce a
+                                   * constant class as template
+                                   * argument, but we have to work
+                                   * around a bug in Intel's icc
+                                   * compiler with this.  
                                     */
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
   inline
   typename MemFunData4<const Class,Arg1,Arg2,Arg3,Arg4,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4) const);
+#endif
    
 
                                   /**
@@ -4245,15 +4351,23 @@ namespace Threads
   typename MemFunData5<Class,Arg1,Arg2,Arg3,Arg4,Arg5,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
                                    /**
                                    * Same as the previous function,
                                    * but for member functions marked
-                                   * @p{const}.
+                                   * @p{const}. This function should
+                                   * not be necessary, since the
+                                   * compiler should deduce a
+                                   * constant class as template
+                                   * argument, but we have to work
+                                   * around a bug in Intel's icc
+                                   * compiler with this.  
                                     */
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
   inline
   typename MemFunData5<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5) const);
+#endif
  
 
                                   /**
@@ -4273,15 +4387,23 @@ namespace Threads
   typename MemFunData6<Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
                                    /**
                                    * Same as the previous function,
                                    * but for member functions marked
-                                   * @p{const}.
+                                   * @p{const}. This function should
+                                   * not be necessary, since the
+                                   * compiler should deduce a
+                                   * constant class as template
+                                   * argument, but we have to work
+                                   * around a bug in Intel's icc
+                                   * compiler with this.  
                                     */
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6>
   inline
   typename MemFunData6<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const);
+#endif
  
                                   /**
                                    * Encapsulate a member function
@@ -4300,15 +4422,23 @@ namespace Threads
   typename MemFunData7<Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
                                    /**
                                    * Same as the previous function,
                                    * but for member functions marked
-                                   * @p{const}.
+                                   * @p{const}. This function should
+                                   * not be necessary, since the
+                                   * compiler should deduce a
+                                   * constant class as template
+                                   * argument, but we have to work
+                                   * around a bug in Intel's icc
+                                   * compiler with this.  
                                     */
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6, typename Arg7>
   inline
   typename MemFunData7<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const);
+#endif
  
                                   /**
                                    * Encapsulate a member function
@@ -4327,15 +4457,23 @@ namespace Threads
   typename MemFunData8<Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
                                    /**
                                    * Same as the previous function,
                                    * but for member functions marked
-                                   * @p{const}.
+                                   * @p{const}. This function should
+                                   * not be necessary, since the
+                                   * compiler should deduce a
+                                   * constant class as template
+                                   * argument, but we have to work
+                                   * around a bug in Intel's icc
+                                   * compiler with this.  
                                     */
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6, typename Arg7, typename Arg8>
   inline
   typename MemFunData8<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const);
+#endif
  
                                   /**
                                    * Encapsulate a member function
@@ -4354,15 +4492,23 @@ namespace Threads
   typename MemFunData9<Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
                                    /**
                                    * Same as the previous function,
                                    * but for member functions marked
-                                   * @p{const}.
+                                   * @p{const}. This function should
+                                   * not be necessary, since the
+                                   * compiler should deduce a
+                                   * constant class as template
+                                   * argument, but we have to work
+                                   * around a bug in Intel's icc
+                                   * compiler with this.  
                                     */
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6, typename Arg7, typename Arg8, typename Arg9>
   inline
   typename MemFunData9<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9) const);
+#endif
  
                                   /**
                                    * Encapsulate a member function
@@ -4381,15 +4527,23 @@ namespace Threads
   typename MemFunData10<Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,Arg10,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10));
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
                                    /**
                                    * Same as the previous function,
                                    * but for member functions marked
-                                   * @p{const}.
+                                   * @p{const}. This function should
+                                   * not be necessary, since the
+                                   * compiler should deduce a
+                                   * constant class as template
+                                   * argument, but we have to work
+                                   * around a bug in Intel's icc
+                                   * compiler with this.  
                                     */
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6, typename Arg7, typename Arg8, typename Arg9, typename Arg10>
   inline
   typename MemFunData10<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,Arg10,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10) const);
+#endif
  
   
                                   /**
@@ -7659,12 +7813,14 @@ namespace Threads
     return fun_ptr;
   }
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
   template <class Class>
   typename MemFunData0<const Class,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)() const)
   {
     return fun_ptr;
   }
+#endif
 
 
 
@@ -7675,12 +7831,14 @@ namespace Threads
     return fun_ptr;
   }
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
   template <class Class, typename Arg1>
   typename MemFunData1<const Class,Arg1,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1) const)
   {
     return fun_ptr;
   }
+#endif
   
 
   
@@ -7691,12 +7849,14 @@ namespace Threads
     return fun_ptr;
   }
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
   template <class Class, typename Arg1, typename Arg2>
   typename MemFunData2<const Class,Arg1,Arg2,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2) const)
   {
     return fun_ptr;
   }
+#endif
   
 
   
@@ -7707,12 +7867,14 @@ namespace Threads
     return fun_ptr;
   }
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
   template <class Class, typename Arg1, typename Arg2, typename Arg3>
   typename MemFunData3<const Class,Arg1,Arg2,Arg3,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3) const)
   {
     return fun_ptr;
   }
+#endif
   
 
   
@@ -7723,12 +7885,14 @@ namespace Threads
     return fun_ptr;
   }
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4>
   typename MemFunData4<const Class,Arg1,Arg2,Arg3,Arg4,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4) const)
   {
     return fun_ptr;
   }
+#endif
 
 
   
@@ -7739,12 +7903,14 @@ namespace Threads
     return fun_ptr;
   }
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5>
   typename MemFunData5<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5) const)
   {
     return fun_ptr;
   }
+#endif
 
 
   
@@ -7755,12 +7921,14 @@ namespace Threads
     return fun_ptr;
   }
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6>
   typename MemFunData6<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const)
   {
     return fun_ptr;
   }
+#endif
 
 
   
@@ -7771,12 +7939,14 @@ namespace Threads
     return fun_ptr;
   }
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6, typename Arg7>
   typename MemFunData7<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const)
   {
     return fun_ptr;
   }
+#endif
 
 
   
@@ -7787,12 +7957,14 @@ namespace Threads
     return fun_ptr;
   }
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6, typename Arg7, typename Arg8>
   typename MemFunData8<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const)
   {
     return fun_ptr;
   }
+#endif
 
 
 
@@ -7803,12 +7975,14 @@ namespace Threads
     return fun_ptr;
   }
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6, typename Arg7, typename Arg8, typename Arg9>
   typename MemFunData9<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9) const)
   {
     return fun_ptr;
   }
+#endif
   
 
   
@@ -7819,12 +7993,14 @@ namespace Threads
     return fun_ptr;
   }
 
+#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG
   template <class Class, typename Arg1, typename Arg2, typename Arg3, typename Arg4, typename Arg5, typename Arg6, typename Arg7, typename Arg8, typename Arg9, typename Arg10>
   typename MemFunData10<const Class,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,Arg10,void>::ArgCollector
   encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10) const)
   {
     return fun_ptr;
   }
+#endif
   
 
   
index e1e6b512c145b1c8565928bf9cbeb0bf66463715..2ec89b9ac444b48c3adb16ef73f32de126c84f7c 100644 (file)
@@ -169,6 +169,8 @@ DEAL_II_CHECK_TEMPLATE_SPEC_ACCESS
 DEAL_II_CHECK_MEMBER_OP_TEMPLATE_INST
 DEAL_II_CHECK_NAMESP_TEMPL_FRIEND_BUG
 DEAL_II_CHECK_TEMPL_SPEC_FRIEND_BUG
+DEAL_II_CHECK_TEMPL_CONST_MEM_PTR_BUG
+DEAL_II_CHECK_CONST_MEM_FUN_PTR_BUG
 DEAL_II_CHECK_IMPLEMENTED_PURE_FUNCTION_BUG
 DEAL_II_CHECK_TEMPLATE_TEMPLATE_TYPEDEF_BUG
 DEAL_II_CHECK_NESTED_CLASS_FRIEND_BUG

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.