Kaydet (Commit) 75b07920 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix HAVE_CXX14_CONSTEXPR check for (at least) Clang 3.9.1

...which appears to happily accept complex C++14-style constexpr function
definitions, and only complains if such a function call is then used in a
constant expression context.

Change-Id: I8f7efd7f0af7b1b98d78840cebfeda8bc96e15d0
üst 2609f36e
......@@ -6216,9 +6216,11 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
int n = n_;
int i = 0;
while (n > 0) { --n; ++i; }
assert(i >= 0);
return i == 0;
}
};
constexpr auto v2 = S{10}.f();
]])], [cxx14_constexpr=yes], [cxx14_constexpr=no])
AC_LANG_POP([C++])
CXXFLAGS=$save_CXXFLAGS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment