Don't let old Clang using -std=c++11 mis-detect HAVE_CXX14_CONSTEXPR
...where an assert in a constexpr function merely triggers a -Wc++1y-extensions
(so doesn't stop configure from assuming HAVE_CXX14_CONSTEXPR, but will later
break with --enable-werror when building include/o3tl/typed_flags_set.hxx). So
stuff back the complex constexpr test function that was swapped out with
6cc5491307
"Work around GCC 5.1 ICE."
Change-Id: I04ba1dc08d96f776b331fa9d0cae1703f2796532
This commit is contained in:
10
configure.ac
10
configure.ac
@@ -6347,6 +6347,16 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|||||||
}
|
}
|
||||||
enum E { e };
|
enum E { e };
|
||||||
auto v = g(E::e);
|
auto v = g(E::e);
|
||||||
|
|
||||||
|
struct S {
|
||||||
|
int n_;
|
||||||
|
constexpr bool f() {
|
||||||
|
int n = n_;
|
||||||
|
int i = 0;
|
||||||
|
while (n > 0) { --n; ++i; }
|
||||||
|
return i == 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
]])], [cxx14_constexpr=yes], [cxx14_constexpr=no])
|
]])], [cxx14_constexpr=yes], [cxx14_constexpr=no])
|
||||||
AC_LANG_POP([C++])
|
AC_LANG_POP([C++])
|
||||||
CXXFLAGS=$save_CXXFLAGS
|
CXXFLAGS=$save_CXXFLAGS
|
||||||
|
Reference in New Issue
Block a user