[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - external/firebird
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 30 08:28:44 UTC 2020
external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1 | 49 ++++++++++
external/firebird/UnpackedTarball_firebird.mk | 4
2 files changed, 53 insertions(+)
New commits:
commit b45283638b2167d32c8b0a09edc227dc6e4c97ee
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Oct 21 18:09:00 2019 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Apr 30 10:28:14 2020 +0200
external/firebird: Make comparison operator member functions const
see commit message of
external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1
for details
Change-Id: I559e4b6ef2dbf3800ff5013dcde078d69296d2fb
Reviewed-on: https://gerrit.libreoffice.org/81261
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93191
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1 b/external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1
new file mode 100644
index 000000000000..42c677f7e5ad
--- /dev/null
+++ b/external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1
@@ -0,0 +1,49 @@
+From 15390d75ee6ca429dbbe15ea04214df8a30fbd48 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman at redhat.com>
+Date: Mon, 21 Oct 2019 17:54:18 +0200
+Subject: [PATCH] Make comparison operator member functions const
+
+...which avoids overload resolution ambiguities in C++20, when a synthesized
+candidate of operator == for a reversed-argument rewrite conflicts with the
+actual operator ==, due to the asymmetric const-ness of the implicit object
+parameter and the RHS parameter. (As observed with recent Clang 10 trunk with
+-std=c++2a when building firebird as part of LibreOffice:
+
+> workdir/UnpackedTarball/firebird/src/jrd/inf.cpp:1139:62: error: use of overloaded operator '!=' is ambiguous (with operand types 'RuntimeStatistics::Iterator' and 'Jrd::RuntimeStatistics::Iterator')
+> for (RuntimeStatistics::Iterator iter = stats.begin(); iter != stats.end(); ++iter)
+> ~~~~ ^ ~~~~~~~~~~~
+> workdir/UnpackedTarball/firebird/src/jrd/../dsql/../jrd/RuntimeStatistics.h:283:8: note: candidate function
+> bool operator!=(const Iterator& other)
+> ^
+> workdir/UnpackedTarball/firebird/src/jrd/../dsql/../jrd/RuntimeStatistics.h:278:8: note: candidate function
+> bool operator==(const Iterator& other)
+> ^
+> workdir/UnpackedTarball/firebird/src/jrd/../dsql/../jrd/RuntimeStatistics.h:278:8: note: candidate function (with reversed parameter order)
+
+)
+---
+ src/jrd/RuntimeStatistics.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/jrd/RuntimeStatistics.h b/src/jrd/RuntimeStatistics.h
+index 74a03de2ad..fab286ad1a 100644
+--- a/src/jrd/RuntimeStatistics.h
++++ b/src/jrd/RuntimeStatistics.h
+@@ -290,12 +290,12 @@ public:
+ {}
+
+ public:
+- bool operator==(const Iterator& other)
++ bool operator==(const Iterator& other) const
+ {
+ return (m_counts == other.m_counts);
+ }
+
+- bool operator!=(const Iterator& other)
++ bool operator!=(const Iterator& other) const
+ {
+ return (m_counts != other.m_counts);
+ }
+--
+2.21.0
+
diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk
index 96f29a76ead5..a2e2dcebc187 100644
--- a/external/firebird/UnpackedTarball_firebird.mk
+++ b/external/firebird/UnpackedTarball_firebird.mk
@@ -18,6 +18,9 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,firebird,\
extern/editline \
))
+# * external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1 is upstream at
+# <https://github.com/FirebirdSQL/firebird/pull/227> "Make comparison operator member functions
+# const":
$(eval $(call gb_UnpackedTarball_add_patches,firebird,\
external/firebird/firebird.disable-ib-util-not-found.patch.1 \
external/firebird/firebird-Engine12.patch \
@@ -31,6 +34,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
external/firebird/c++17.patch \
external/firebird/ubsan.patch \
external/firebird/asan.patch \
+ external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1 \
))
ifeq ($(OS),WNT)
More information about the Libreoffice-commits
mailing list