Files
opm-core/m4/cxx0x_static_assert.m4
Roland Kaufmann 2a43bd305a Add macros for testing C++0x/11 support in compiler
These files are shamelessly ripped from dune-common/m4 (e28ca3)
2012-10-24 10:23:51 +02:00

15 lines
499 B
Plaintext

AC_DEFUN([STATIC_ASSERT_CHECK],[
AC_CACHE_CHECK([whether static_assert is supported], dune_cv_static_assert_support, [
AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([GXX0X])
AC_LANG_PUSH([C++])
AC_TRY_COMPILE([],[static_assert(true,"MSG")],
dune_cv_static_assert_support=yes,
dune_cv_static_assert_support=no)
AC_LANG_POP
])
if test "x$dune_cv_static_assert_support" = xyes; then
AC_DEFINE(HAVE_STATIC_ASSERT, 1, [Define to 1 if static_assert is supported])
fi
])