From f48e005907e5453916c4ccb4135a4621bdfb63c5 Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 7 Jan 2003 21:15:17 +0000 Subject: [PATCH] I previously thought, icc was in error and wrote an autoconf check to work around the problem. However, it turns out that icc is right, and gcc uses some undocumented extension in this case; however, it is fine with the code that we also use for icc so remove the autoconf check, and remove the conditional compilation. git-svn-id: https://svn.dealii.org/trunk@6881 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/aclocal.m4 | 118 --------- deal.II/base/include/base/config.h.in | 14 +- deal.II/base/include/base/thread_management.h | 242 +++--------------- deal.II/configure | 143 +---------- deal.II/configure.in | 2 - 5 files changed, 36 insertions(+), 483 deletions(-) diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index 1d71d3387e..0d980d74a0 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -1908,124 +1908,6 @@ 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 e9bf8556f5..bb0faf61db 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, 2003 by the deal.II authors +// Copyright (C) 2001, 2002 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -36,12 +36,6 @@ */ #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 @@ -100,12 +94,6 @@ 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 d091a39105..d7f5933619 100644 --- a/deal.II/base/include/base/thread_management.h +++ b/deal.II/base/include/base/thread_management.h @@ -412,21 +412,17 @@ 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}. This should not - * really be necessary, but Intel's - * compiler has a bug here so we - * have to work around. + * @p{const}. */ template struct MemFunPtr0 { typedef RetType (Class::*type) () const; }; -#endif + /** * Given a class, argument types, * and the return type, generate a @@ -439,21 +435,17 @@ 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}. This should not - * really be necessary, but Intel's - * compiler has a bug here so we - * have to work around. + * @p{const}. */ template struct MemFunPtr1 { typedef RetType (Class::*type) (Arg1) const; }; -#endif + /** * Given a class, argument types, * and the return type, generate a @@ -466,21 +458,17 @@ 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}. This should not - * really be necessary, but Intel's - * compiler has a bug here so we - * have to work around. + * @p{const}. */ template struct MemFunPtr2 { typedef RetType (Class::*type) (Arg1, Arg2) const; }; -#endif + /** * Given a class, argument types, @@ -494,21 +482,17 @@ 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}. This should not - * really be necessary, but Intel's - * compiler has a bug here so we - * have to work around. + * @p{const}. */ template struct MemFunPtr3 { typedef RetType (Class::*type) (Arg1, Arg2, Arg3) const; }; -#endif + /** * Given a class, argument types, @@ -522,21 +506,17 @@ 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}. This should not - * really be necessary, but Intel's - * compiler has a bug here so we - * have to work around. + * @p{const}. */ template struct MemFunPtr4 { typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4) const; }; -#endif + /** * Given a class, argument types, @@ -550,21 +530,17 @@ 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}. This should not - * really be necessary, but Intel's - * compiler has a bug here so we - * have to work around. + * @p{const}. */ template struct MemFunPtr5 { typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5) const; }; -#endif + /** * Given a class, argument types, @@ -578,21 +554,17 @@ 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}. This should not - * really be necessary, but Intel's - * compiler has a bug here so we - * have to work around. + * @p{const}. */ template struct MemFunPtr6 { typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const; }; -#endif + /** * Given a class, argument types, @@ -606,21 +578,17 @@ 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}. This should not - * really be necessary, but Intel's - * compiler has a bug here so we - * have to work around. + * @p{const}. */ template struct MemFunPtr7 { typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const; }; -#endif + /** @@ -635,21 +603,17 @@ 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}. This should not - * really be necessary, but Intel's - * compiler has a bug here so we - * have to work around. + * @p{const}. */ template struct MemFunPtr8 { typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const; }; -#endif + @@ -665,21 +629,17 @@ 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}. This should not - * really be necessary, but Intel's - * compiler has a bug here so we - * have to work around. + * @p{const}. */ template struct MemFunPtr9 { typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9) const; }; -#endif + @@ -696,21 +656,17 @@ 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}. This should not - * really be necessary, but Intel's - * compiler has a bug here so we - * have to work around. + * @p{const}. */ template struct MemFunPtr10 { typedef RetType (Class::*type) (Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10) const; }; -#endif + @@ -2352,12 +2308,10 @@ 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 }; @@ -2494,12 +2448,10 @@ 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 }; @@ -2640,12 +2592,10 @@ 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 }; @@ -2789,12 +2739,10 @@ 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 }; @@ -2942,12 +2890,10 @@ 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 }; @@ -3100,13 +3046,11 @@ 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 }; @@ -3263,13 +3207,11 @@ 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 }; @@ -3430,13 +3372,11 @@ 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 }; @@ -3601,14 +3541,12 @@ 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 }; @@ -3777,14 +3715,12 @@ 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 }; @@ -3957,14 +3893,12 @@ 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 }; @@ -4172,23 +4106,15 @@ 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}. 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. + * @p{const}. */ template inline typename MemFunData0::ArgCollector encapsulate (void (Class::*fun_ptr)() const); -#endif /** * Encapsulate a member function @@ -4207,23 +4133,15 @@ 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}. 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. + * @p{const}. */ template inline typename MemFunData1::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1) const); -#endif /** @@ -4243,23 +4161,15 @@ 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}. 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. + * @p{const}. */ template inline typename MemFunData2::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2) const); -#endif /** @@ -4279,23 +4189,15 @@ 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}. 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. + * @p{const}. */ template inline typename MemFunData3::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3) const); -#endif /** @@ -4315,23 +4217,15 @@ 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}. 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. + * @p{const}. */ template inline typename MemFunData4::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4) const); -#endif /** @@ -4351,23 +4245,15 @@ 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}. 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. + * @p{const}. */ template inline typename MemFunData5::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5) const); -#endif /** @@ -4387,23 +4273,15 @@ 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}. 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. + * @p{const}. */ template inline typename MemFunData6::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const); -#endif /** * Encapsulate a member function @@ -4422,23 +4300,15 @@ 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}. 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. + * @p{const}. */ template inline typename MemFunData7::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const); -#endif /** * Encapsulate a member function @@ -4457,23 +4327,15 @@ 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}. 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. + * @p{const}. */ template inline typename MemFunData8::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const); -#endif /** * Encapsulate a member function @@ -4492,23 +4354,15 @@ 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}. 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. + * @p{const}. */ 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 @@ -4527,23 +4381,15 @@ 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}. 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. + * @p{const}. */ template inline typename MemFunData10::ArgCollector encapsulate (void (Class::*fun_ptr)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8, Arg9, Arg10) const); -#endif /** @@ -7813,14 +7659,12 @@ 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 @@ -7831,14 +7675,12 @@ 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 @@ -7849,14 +7691,12 @@ 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 @@ -7867,14 +7707,12 @@ 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 @@ -7885,14 +7723,12 @@ 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 @@ -7903,14 +7739,12 @@ 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 @@ -7921,14 +7755,12 @@ 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 @@ -7939,14 +7771,12 @@ 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 @@ -7957,14 +7787,12 @@ 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 @@ -7975,14 +7803,12 @@ 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 @@ -7993,14 +7819,12 @@ 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 b/deal.II/configure index 060960b7a6..69cb9f9aa1 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.130 . +# From configure.in Revision: 1.131 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57. # @@ -4351,145 +4351,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF -fi -rm -f conftest.$ac_objext conftest.$ac_ext - - - echo "$as_me:$LINENO: checking for templates and pointers to const member functions bug" >&5 -echo $ECHO_N "checking for templates and pointers to const member functions bug... $ECHO_C" >&6 - ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - CXXFLAGS="$CXXFLAGSG" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - template void encapsulate (void (Class::*fun_ptr)()); - - struct X { - void bar () const; - }; - - void foo () { - encapsulate(&X::bar); - }; - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - echo "$as_me:$LINENO: result: yes. using workaround" >&5 -echo "${ECHO_T}yes. using workaround" >&6 - -cat >>confdefs.h <<\_ACEOF -#define DEAL_II_TEMPL_CONST_MEM_PTR_BUG 1 -_ACEOF - - -fi -rm -f conftest.$ac_objext conftest.$ac_ext - - - echo "$as_me:$LINENO: checking for const member function pointers bug" >&5 -echo $ECHO_N "checking for const member function pointers bug... $ECHO_C" >&6 - ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - CXXFLAGS="$CXXFLAGSG" - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - template struct Y { - typedef void (Class::*FunPtr) (); - FunPtr fun_ptr; - Class *object; - void foo () { - (object->*fun_ptr)(); - }; - }; - - struct X {}; - - template class Y; - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - echo "$as_me:$LINENO: result: yes. using workaround" >&5 -echo "${ECHO_T}yes. using workaround" >&6 - -cat >>confdefs.h <<\_ACEOF -#define DEAL_II_CONST_MEM_FUN_PTR_BUG 1 -_ACEOF - - fi rm -f conftest.$ac_objext conftest.$ac_ext @@ -8327,7 +8188,7 @@ echo echo " The deal.II library is now configured. In order to" echo " compile it and to generate the documentation, just" echo " call 'make' without arguments for a list of options." -echo " For more information, see the Readme file." +echo " For more information, see the doc/readme.html file." echo echo ------------------------------------------------------------- echo diff --git a/deal.II/configure.in b/deal.II/configure.in index 2ec89b9ac4..e1e6b512c1 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -169,8 +169,6 @@ 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 -- 2.39.5