Skip to content
Snippets Groups Projects
Commit 1e3e95ba authored by Martin Nolte's avatar Martin Nolte
Browse files

do not use assert in configure tests (otherwise NDEBUG influences the outcome)!

also use AS_IF instead of direct shell commands (more portable)

[[Imported from SVN: r6572]]
parent a5f88832
Branches
Tags
No related merge requests found
......@@ -9,7 +9,7 @@ AC_DEFUN([VARIADIC_CONSTRUCTOR_SFINAE_CHECK],[
AC_REQUIRE([GXX0X])
AC_LANG_PUSH([C++])
AC_RUN_IFELSE([
AC_LANG_PROGRAM([#include <cassert>
AC_LANG_PROGRAM([
#include <functional>
template<typename... U>
......@@ -38,17 +38,13 @@ AC_DEFUN([VARIADIC_CONSTRUCTOR_SFINAE_CHECK],[
int i;
};],
[
assert( A<int>().i +
A<int>(2).i +
A<int>("foo",3.4).i +
A<int>(8,'a',A<int>()).i == 0);
return 0;
return (A<int>().i + A<int>(2).i + A<int>("foo",3.4).i + A<int>(8,'a',A<int>()).i == 0 ? 0 : 1);
])],
dune_cv_variadic_constructor_sfinae_support=yes,
dune_cv_variadic_constructor_sfinae_support=no)
AC_LANG_POP
])
if test "x$dune_cv_variadic_constructor_sfinae_support" = xyes; then
AS_IF([test "x$dune_cv_variadic_constructor_sfinae_support" = xyes],[
AC_DEFINE(HAVE_VARIADIC_CONSTRUCTOR_SFINAE, 1, [Define to 1 if SFINAE on variadic template constructors is fully supported])
fi
])
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment