From: wolf Date: Tue, 7 Jan 2003 21:26:55 +0000 (+0000) Subject: Umph. Undo last check-in, since it is formally correct yet leads to an ICE in gcc... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92c8f6f41970005fe5d833ee3cc7124fb001817f;p=dealii-svn.git Umph. Undo last check-in, since it is formally correct yet leads to an ICE in gcc... git-svn-id: https://svn.dealii.org/trunk@6882 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 0d980d74a0..1d71d3387e 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -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 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 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 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; +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 struct Y { + typedef void (Class::*FunPtr) (); + FunPtr fun_ptr; + Class *object; + void foo () { + (object->*fun_ptr)(); + }; + }; + + struct X {}; + + template class Y; + ], + [], + [ + 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 diff --git a/deal.II/base/include/base/config.h.in b/deal.II/base/include/base/config.h.in index bb0faf61db..e9bf8556f5 100644 --- a/deal.II/base/include/base/config.h.in +++ b/deal.II/base/include/base/config.h.in @@ -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 @@ -36,6 +36,12 @@ */ #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 @@ -94,6 +100,12 @@ 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 diff --git a/deal.II/base/include/base/thread_management.h b/deal.II/base/include/base/thread_management.h index d7f5933619..d091a39105 100644 --- a/deal.II/base/include/base/thread_management.h +++ b/deal.II/base/include/base/thread_management.h @@ -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 struct MemFunPtr0 { 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 struct MemFunPtr1 { 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 struct MemFunPtr2 { 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 struct MemFunPtr3 { 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 struct MemFunPtr4 { 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 struct MemFunPtr5 { 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 struct MemFunPtr6 { 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 struct MemFunPtr7 { 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 struct MemFunPtr8 { 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 struct MemFunPtr9 { 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 struct MemFunPtr10 { typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10) const; }; - +#endif @@ -2308,10 +2352,12 @@ namespace Threads typename MemFunData0::ArgCollector encapsulate (void (Class_::*fun_ptr)()); +#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG template friend typename MemFunData0::ArgCollector encapsulate (void (Class_::*fun_ptr)() const); +#endif }; @@ -2448,10 +2494,12 @@ namespace Threads typename MemFunData1::ArgCollector encapsulate (void (Class_::*fun_ptr)(Arg1_)); +#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG template friend typename MemFunData1::ArgCollector encapsulate (void (Class_::*fun_ptr)(Arg1_) const); +#endif }; @@ -2592,10 +2640,12 @@ namespace Threads typename MemFunData2::ArgCollector encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_)); +#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG template friend typename MemFunData2::ArgCollector encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_) const); +#endif }; @@ -2739,10 +2789,12 @@ namespace Threads typename MemFunData3::ArgCollector encapsulate (void (Class_::*fun_ptr)(Arg1_,Arg2_,Arg3_)); +#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG template friend typename MemFunData3::ArgCollector encapsulate (void (Class_::*fun_ptr)(Arg1_,Arg2_,Arg3_) const); +#endif }; @@ -2890,10 +2942,12 @@ namespace Threads typename MemFunData4::ArgCollector encapsulate (void (Class_::*fun_ptr)(Arg1_, Arg2_, Arg3_, Arg4_)); +#ifdef DEAL_II_TEMPL_CONST_MEM_PTR_BUG template friend typename MemFunData4::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 friend typename MemFunData5::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 friend typename MemFunData6::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 friend typename MemFunData7::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 friend typename MemFunData8::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 friend typename MemFunData9::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 friend typename MemFunData10::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::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 inline typename MemFunData0::ArgCollector encapsulate (void (Class::*fun_ptr)() const); +#endif /** * Encapsulate a member function @@ -4133,15 +4207,23 @@ namespace Threads typename MemFunData1::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 inline typename MemFunData1::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1) const); +#endif /** @@ -4161,15 +4243,23 @@ namespace Threads typename MemFunData2::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 inline typename MemFunData2::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2) const); +#endif /** @@ -4189,15 +4279,23 @@ namespace Threads typename MemFunData3::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 inline typename MemFunData3::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3) const); +#endif /** @@ -4217,15 +4315,23 @@ namespace Threads typename MemFunData4::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 inline typename MemFunData4::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4) const); +#endif /** @@ -4245,15 +4351,23 @@ namespace Threads typename MemFunData5::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 inline typename MemFunData5::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5) const); +#endif /** @@ -4273,15 +4387,23 @@ namespace Threads typename MemFunData6::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 inline typename MemFunData6::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::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 inline typename MemFunData7::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::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 inline typename MemFunData8::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::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 inline typename MemFunData9::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::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 inline typename MemFunData10::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 typename MemFunData0::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 typename MemFunData1::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 typename MemFunData2::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 typename MemFunData3::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 typename MemFunData4::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 typename MemFunData5::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 typename MemFunData6::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 typename MemFunData7::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 typename MemFunData8::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 typename MemFunData9::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 typename MemFunData10::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10) const) { return fun_ptr; } +#endif diff --git a/deal.II/configure.in b/deal.II/configure.in index e1e6b512c1..2ec89b9ac4 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -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