summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-04-17 14:42:20 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-04-17 17:23:29 +0200
commit4d1bd3cba9b4c971c05974a2805b018ec8ba18e2 (patch)
treeca2fe545df09fd0dc56fe44db3d50ef61c427436
parentBreak overly long line (diff)
downloadcore-4d1bd3cba9b4c971c05974a2805b018ec8ba18e2.tar.gz
core-4d1bd3cba9b4c971c05974a2805b018ec8ba18e2.zip
HAVE_CPP_GUARANTEED_COPY_ELISION should always be true now
...since 24973523ba59087185d434396fd614e73d72107f "Bump Windows build baseline to Visual Studio 2019 16.4", where that version of the compiler appears to no longer have the issue that at least VS 2017 15.8.1 had. And according to <view-source:https://en.cppreference.com/w/cpp/compiler_support>, the other compilers support it since GCC 7 and Clang 4, so we should be OK there. But for safety, leave the configure.ac check in for some longer. Change-Id: I07bfaa554d897613c0887ab70e8df93f6e000410 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92422 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--config_host/config_global.h.in3
-rw-r--r--configure.ac9
-rw-r--r--include/editeng/swafopt.hxx4
3 files changed, 4 insertions, 12 deletions
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index 3f9dded93882..951c2502ba9c 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -18,9 +18,6 @@ Any change in this header will cause a rebuild of almost everything.
#define HAVE_GCC_DEPRECATED_MESSAGE 0
#define HAVE_SYSLOG_H 0
-/* Guaranteed copy elision (C++17), __cpp_guaranteed_copy_elision (C++2a): */
-#define HAVE_CPP_GUARANTEED_COPY_ELISION 0
-
// Compiler supports all of C++2a <https://wg21.link/P0202R3> "Add Constexpr Modifiers to Functions
// in <algorithm> and <utility> Headers", <https://wg21.link/P1004R2> "Making std::vector
// constexpr", and <https://wg21.link/P1143R2> "Adding the constinit keyword":
diff --git a/configure.ac b/configure.ac
index 1eb9a1af7898..42945571edf9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6678,7 +6678,8 @@ if test "$GCC" = yes; then
fi
AC_SUBST([HAVE_GCC_FNO_SIZED_DEALLOCATION])
-AC_MSG_CHECKING([whether $CXX_BASE supports guaranteed copy elision])
+dnl This check can eventually be removed completely (e.g., after libreoffice-7-0 branch off):
+AC_MSG_CHECKING([that $CXX_BASE supports guaranteed copy elision])
AC_LANG_PUSH([C++])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
@@ -6696,10 +6697,8 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
S copy();
void f() { S c(copy()); }
#endif
- ])], [
- AC_DEFINE([HAVE_CPP_GUARANTEED_COPY_ELISION],[1])
- AC_MSG_RESULT([yes])
- ], [AC_MSG_RESULT([no])])
+ ])], [AC_MSG_RESULT([yes])
+ ], [AC_MSG_ERROR([no])])
CXXFLAGS=$save_CXXFLAGS
AC_LANG_POP([C++])
diff --git a/include/editeng/swafopt.hxx b/include/editeng/swafopt.hxx
index 0d4e6ba310e8..360954a24ab8 100644
--- a/include/editeng/swafopt.hxx
+++ b/include/editeng/swafopt.hxx
@@ -22,7 +22,6 @@
#include <sal/config.h>
-#include <config_global.h>
#include <editeng/editengdllapi.h>
#include <o3tl/sorted_vector.hxx>
#include <rtl/ustring.hxx>
@@ -59,9 +58,6 @@ class SortedAutoCompleteStrings
SortedAutoCompleteStrings& operator =(SortedAutoCompleteStrings const &) = delete;
-#if !HAVE_CPP_GUARANTEED_COPY_ELISION
-public:
-#endif
// For createNonOwningCopy only:
SortedAutoCompleteStrings(SortedAutoCompleteStrings const & other):
sorted_vector(other), owning_(false) {}