])
-
-dnl -------------------------------------------------------------
-dnl Some compiler versions, notably ICC, have trouble with the
-dnl following code in which we explicitly call a destructor.
-dnl This has to be worked around with a typedef. The problem is
-dnl that the workaround fails with some other compilers, so that
-dnl we can not unconditionally use the workaround...
-dnl
-dnl Usage: DEAL_II_CHECK_EXPLICIT_DESTRUCTOR_BUG
-dnl
-dnl -------------------------------------------------------------
-AC_DEFUN(DEAL_II_CHECK_EXPLICIT_DESTRUCTOR_BUG, dnl
-[
- AC_MSG_CHECKING(for explicit destructor call bug)
- AC_LANG(C++)
- CXXFLAGS="$CXXFLAGSG"
- AC_TRY_COMPILE(
- [
- namespace dealii
- {
- namespace FEValuesViews
- {
- template <int dim, int spacedim> struct Scalar {};
- }
-
- template <int dim, int spacedim>
- struct X
- {
- FEValuesViews::Scalar<dim,spacedim> scalars[dim*spacedim];
-
- void f()
- {
- scalars[0].dealii::FEValuesViews::Scalar<dim,spacedim>::~Scalar ();
- }
- };
-
- template struct X<2,2>;
- }
- ],
- [],
- [
- AC_MSG_RESULT(no)
- ],
- [
- AC_MSG_RESULT(yes. using workaround)
- AC_DEFINE_UNQUOTED(DEAL_II_EXPLICIT_DESTRUCTOR_BUG, 1,
- [Define if we have to work around a bug where the
- compiler doesn't accept an explicit destructor call.
- See the aclocal.m4 file in the top-level directory
- for a description of this bug.])
- ])
-])
-
-
dnl -------------------------------------------------------------
dnl Versions of GCC before 3.0 had a problem with the following
dnl code:
ELSE()
SET(DEAL_II_MEMBER_OP_TEMPLATE_INST "template")
ENDIF()
+
+
+
+#
+# Some compiler versions, notably ICC, have trouble with the
+# following code in which we explicitly call a destructor.
+# This has to be worked around with a typedef. The problem is
+# that the workaround fails with some other compilers, so that
+# we can not unconditionally use the workaround...
+#
+CHECK_CXX_COMPILER_BUG(
+ "
+ namespace dealii
+ {
+ namespace FEValuesViews
+ {
+ template <int dim, int spacedim> struct Scalar {};
+ }
+
+ template <int dim, int spacedim>
+ struct X
+ {
+ FEValuesViews::Scalar<dim,spacedim> scalars[dim*spacedim];
+
+ void f()
+ {
+ scalars[0].dealii::FEValuesViews::Scalar<dim,spacedim>::~Scalar ();
+ }
+ };
+
+ template struct X<2,2>;
+ }
+ int main() { return 0; }
+ "
+ DEAL_II_EXPLICIT_DESTRUCTOR_BUG)
constructors. */
#cmakedefine DEAL_II_EXPLICIT_CONSTRUCTOR_BUG
-/* Define if we have to work around a bug where the compiler doesn't accept an
- explicit destructor call. See the aclocal.m4 file in the top-level
- directory for a description of this bug. */
-#cmakedefine DEAL_II_EXPLICIT_DESTRUCTOR_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. */