summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-07-04 15:51:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-07-04 23:04:00 +0200
commita9303d85a4f201a42322e8e4ce5ebe6e6ca728b0 (patch)
treedd55c9ce5d9d59d92fcc93130316f5a4e96810ea /configure.ac
parent8d69ca2d310de2e6275b93b4fd6cd40f05e9e84e (diff)
Make brittle SortedAutoCompleteStrings ownership handling more explicit
Change-Id: Ieaf2231a84d97528bb1b9a410c4ee0c38966dd27 Reviewed-on: https://gerrit.libreoffice.org/56950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index bc76475962c9..45c19e72b9c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6482,6 +6482,29 @@ if test "$GCC" = yes; then
fi
AC_SUBST([HAVE_GCC_FNO_SIZED_DEALLOCATION])
+HAVE_CPP_GUARANTEED_COPY_ELISION=
+AC_MSG_CHECKING([whether $CXX supports guaranteed copy elision])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+ #if !defined __cpp_guaranteed_copy_elision
+ struct S {
+ private:
+ S(S const &);
+ public:
+ S copy() const { return *this; }
+ };
+ void f(S & s) { S c(s.copy()); }
+ #endif
+ ])], [
+ AC_DEFINE([HAVE_CPP_GUARANTEED_COPY_ELISION],[1])
+ AC_MSG_RESULT([yes])
+ ], [AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+AC_SUBST([HAVE_CPP_GUARANTEED_COPY_ELISION])
+
dnl ===================================================================
dnl system stl sanity tests
dnl ===================================================================