]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove some tests that we don't need any more.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 31 Mar 2003 16:32:58 +0000 (16:32 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 31 Mar 2003 16:32:58 +0000 (16:32 +0000)
git-svn-id: https://svn.dealii.org/trunk@7346 0785d39b-7218-0410-832d-ea1e28bc413d

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

index feed3bc8bc4b7478da4affb174bf7c489aa3eb7f..29f87fe13eb1feddd918bc2b2d17c76fcafff147 100644 (file)
@@ -2059,124 +2059,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 <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
@@ -2341,53 +2223,6 @@ AC_DEFUN(DEAL_II_CHECK_NESTED_CLASS_FRIEND_BUG, dnl
 
 
 
-dnl -------------------------------------------------------------
-dnl Icc7 gets this wrong:
-dnl ----------------------
-dnl class O {
-dnl   class I {
-dnl    class II {};
-dnl     };
-dnl   friend class I::II;
-dnl };
-dnl ----------------------
-dnl It complains in the friend declaration that I::II is not accessible.
-dnl This is bogus, since we don't need to have access to a class that we
-dnl want to grant friendship (friendship goes the other way round).
-dnl
-dnl We work around this problem, if we encounter it.
-dnl
-dnl Usage: DEAL_II_CHECK_NESTED_NESTED_FRIEND_BUG
-dnl
-dnl -------------------------------------------------------------
-AC_DEFUN(DEAL_II_CHECK_NESTED_NESTED_FRIEND_BUG, dnl
-[
-  AC_MSG_CHECKING(for nested nested classes friends bug)
-  AC_LANG(C++)
-  CXXFLAGS="$CXXFLAGSG"
-  AC_TRY_COMPILE(
-    [
-      class O {
-          class I {
-       class II {};
-          };
-          friend class I::II;
-      };
-    ],
-    [],
-    [
-      AC_MSG_RESULT(no)
-    ],
-    [
-      AC_MSG_RESULT(yes. using workaround)
-      AC_DEFINE(DEAL_II_NESTED_NESTED_FRIEND_BUG, 1, 
-                     [Defined if the compiler does not allow to make a class
-                      a friend to which we do not have access.])
-    ])
-])
-
-
-
 dnl -------------------------------------------------------------
 dnl Many compilers get this wrong (see Section 14.7.3.1, number (4)):
 dnl ---------------------------------
@@ -2493,6 +2328,52 @@ AC_DEFUN(DEAL_II_CHECK_LONG_DOUBLE_LOOP_BUG, dnl
 
 
 
+dnl -------------------------------------------------------------
+dnl gcc2.95 (but not later compilers) has a bug with taking the
+dnl address of a function with template template parameters (or
+dnl with calling this function by specifying explicitly the template
+dnl arguments). This requires some working around that in turn does
+dnl not work with later compilers.
+dnl
+dnl Usage: DEAL_II_CHECK_FUNPTR_TEMPLATE_TEMPLATE_BUG
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_FUNPTR_TEMPLATE_TEMPLATE_BUG, dnl
+[
+  AC_MSG_CHECKING(for address of template template function bug)
+  AC_LANG(C++)
+  CXXFLAGS="$CXXFLAGSG"
+  AC_TRY_COMPILE(
+    [
+      template <int> struct X {};
+
+      template <int dim, template <int> class T>
+      void f(T<dim>);
+
+      template <int dim, template <int> class T>
+      void g() 
+      {
+        void (*p) (T<dim>) = &f<dim,T>;
+      }
+
+      template void g<2,X> ();
+    ],
+    [],
+    [
+      AC_MSG_RESULT(no)
+    ],
+    [
+      AC_MSG_RESULT(yes. using workaround)
+      AC_DEFINE(DEAL_II_FUNPTR_TEMPLATE_TEMPLATE_BUG, 1, 
+                     [Defined if the compiler needs a workaround for
+                     certain problems with taking the address of 
+                      template template functions. For the details, look at
+                      aclocal.m4 in the top-level directory.])
+    ])
+])
+
+
+
 dnl -------------------------------------------------------------
 dnl We have so many templates in deal.II that sometimes we need
 dnl to make it clear with which types a template parameter can
index 877fda5431d40830cb81630f79b534f6f5c2b140..8acd99eb5fe4340a4b0cc20ca5b780fb72821b9e 100644 (file)
    */
 #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
+/* Defined if the compiler needs a workaround for certain problems with taking
+   the address of template template functions. For the details, look at
+   aclocal.m4 in the top-level directory. */
+#undef DEAL_II_FUNPTR_TEMPLATE_TEMPLATE_BUG
 
 /* Flag indicating whether the library shall be compiled to use the Tecplot
    interface */
    friends of the enclosing class. */
 #undef DEAL_II_NESTED_CLASS_FRIEND_BUG
 
-/* Defined if the compiler does not allow to make a class a friend to which we
-   do not have access. */
-#undef DEAL_II_NESTED_NESTED_FRIEND_BUG
-
 /* Path to the deal.II directory */
 #undef DEAL_II_PATH
 
    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 75696c0b7bcd034f5c20807202ae2f018085802c..89d2ca7c0486288c8ab401d24bd495f647a05b06 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision.
+# From configure.in Revision: 1.149 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.57.
 #
@@ -4479,145 +4479,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 <class Class> 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 <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>;
-
-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
 
@@ -4764,8 +4625,8 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 
-  echo "$as_me:$LINENO: checking for nested classes are implicit friends bug" >&5
-echo $ECHO_N "checking for nested classes are implicit friends bug... $ECHO_C" >&6
+  echo "$as_me:$LINENO: checking for address of template template function bug" >&5
+echo $ECHO_N "checking for address of template template function bug... $ECHO_C" >&6
   ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4781,14 +4642,18 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-       struct X {
-         private:
-           static int f();
+      template <int> struct X {};
 
-           struct Y {
-               int g() { return f(); };
-           };
-       };
+      template <int dim, template <int> class T>
+      void f(T<dim>);
+
+      template <int dim, template <int> class T>
+      void g()
+      {
+        void (*p) (T<dim>) = &f<dim,T>;
+      }
+
+      template void g<2,X> ();
 
 int
 main ()
@@ -4823,7 +4688,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 echo "${ECHO_T}yes. using workaround" >&6
 
 cat >>confdefs.h <<\_ACEOF
-#define DEAL_II_NESTED_CLASS_FRIEND_BUG 1
+#define DEAL_II_FUNPTR_TEMPLATE_TEMPLATE_BUG 1
 _ACEOF
 
 
@@ -4831,8 +4696,8 @@ fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 
 
-  echo "$as_me:$LINENO: checking for nested nested classes friends bug" >&5
-echo $ECHO_N "checking for nested nested classes friends bug... $ECHO_C" >&6
+  echo "$as_me:$LINENO: checking for nested classes are implicit friends bug" >&5
+echo $ECHO_N "checking for nested classes are implicit friends bug... $ECHO_C" >&6
   ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4848,12 +4713,14 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-      class O {
-          class I {
-       class II {};
-          };
-          friend class I::II;
-      };
+       struct X {
+         private:
+           static int f();
+
+           struct Y {
+               int g() { return f(); };
+           };
+       };
 
 int
 main ()
@@ -4888,7 +4755,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 echo "${ECHO_T}yes. using workaround" >&6
 
 cat >>confdefs.h <<\_ACEOF
-#define DEAL_II_NESTED_NESTED_FRIEND_BUG 1
+#define DEAL_II_NESTED_CLASS_FRIEND_BUG 1
 _ACEOF
 
 
index 6587524e97112e731a7c5d6c2d080fd842b4b8ad..f4f5dce26cf24680d6862fb2cb6117400cd2e99e 100644 (file)
@@ -169,12 +169,10 @@ DEAL_II_CHECK_MEMBER_OP_TEMPLATE_INST
 DEAL_II_CHECK_NAMESP_TEMPL_FRIEND_BUG
 DEAL_II_CHECK_NAMESP_TEMPL_FRIEND_BUG2
 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_FUNPTR_TEMPLATE_TEMPLATE_BUG
 DEAL_II_CHECK_NESTED_CLASS_FRIEND_BUG
-DEAL_II_CHECK_NESTED_NESTED_FRIEND_BUG
 DEAL_II_CHECK_MEMBER_VAR_SPECIALIZATION_BUG
 DEAL_II_CHECK_LONG_DOUBLE_LOOP_BUG
 DEAL_II_CHECK_SFINAE_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.