[Libreoffice-commits] core.git: config_host/config_global.h.in configure.ac include/editeng
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 17 15:24:10 UTC 2020
config_host/config_global.h.in | 3 ---
configure.ac | 9 ++++-----
include/editeng/swafopt.hxx | 4 ----
3 files changed, 4 insertions(+), 12 deletions(-)
New commits:
commit 4d1bd3cba9b4c971c05974a2805b018ec8ba18e2
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Apr 17 14:42:20 2020 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Apr 17 17:23:29 2020 +0200
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 at redhat.com>
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) {}
More information about the Libreoffice-commits
mailing list