diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-09 12:22:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-09 12:22:17 +0100 |
commit | 9d3cb71115cfb34adde975f66f394303982f85be (patch) | |
tree | adf872556cd90007038c9cf22f7a0aac630395f1 /configure.ac | |
parent | 53352be12cb6a191934b8107559ea47171868718 (diff) |
Prevent += called on temporary O[U]String instances
...found regression e31205f3ec1f941ab5a188bfde6329edf2acc55b
"EditUndoRemoveChars::GetStr must return a reference" and dubious code
0e23f7b0839df68d277186b4df54ba391ac3406a "Lets assume this doesn't want to
update m_pForcedPrefix->GetText() anyway" in addition to the apparent sillies
directly fixed in this commit.
Introduces HAVE_CXX11_REF_QUALIFIER.
Change-Id: I564e98254fd53c1dd9b34193d7057c59721ee24c
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index cf52e9d46ad5..2f064eb8acd3 100644 --- a/configure.ac +++ b/configure.ac @@ -6335,6 +6335,23 @@ if test "$cxx14_constexpr" = yes; then AC_DEFINE([HAVE_CXX14_CONSTEXPR]) fi +AC_MSG_CHECKING([whether $CXX supports C++11 ref-qualifier]) +save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11" +AC_LANG_PUSH([C++]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + struct S { + void f() &; + void f() &&; + }; + ]])], [cxx11_ref_qualifier=yes], [cxx11_ref_qualifier=no]) +AC_LANG_POP([C++]) +CXXFLAGS=$save_CXXFLAGS +AC_MSG_RESULT([$cxx11_ref_qualifier]) +if test "$cxx11_ref_qualifier" = yes; then + AC_DEFINE([HAVE_CXX11_REF_QUALIFIER]) +fi + AC_MSG_CHECKING([whether $CXX supports C++14 sized deallocation]) if test "$CROSS_COMPILING" = TRUE; then cxx14_sized_deallocation=no |