diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-20 10:47:21 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-20 10:47:21 +0100 |
commit | 75b079201b479fbc448f41427106a52b4e06e445 (patch) | |
tree | 46ab69a561853f74d4b20f2ddfe75e057d02dc92 /configure.ac | |
parent | 2609f36ec58f1b5910bb621d963d1be72e5bf9ca (diff) |
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
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 22c0f09dc750..b50b44521725 100644 --- a/configure.ac +++ b/configure.ac @@ -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 |