summaryrefslogtreecommitdiffstats
path: root/external/icu/c++20-comparison.patch
diff options
context:
space:
mode:
Diffstat (limited to 'external/icu/c++20-comparison.patch')
-rw-r--r--external/icu/c++20-comparison.patch171
1 files changed, 171 insertions, 0 deletions
diff --git a/external/icu/c++20-comparison.patch b/external/icu/c++20-comparison.patch
new file mode 100644
index 000000000..44053e671
--- /dev/null
+++ b/external/icu/c++20-comparison.patch
@@ -0,0 +1,171 @@
+--- source/common/uvector.cpp
++++ source/common/uvector.cpp
+@@ -110,7 +110,7 @@
+ }
+
+ // This only does something sensible if this object has a non-null comparer
+-UBool UVector::operator==(const UVector& other) {
++UBool UVector::operator==(const UVector& other) const {
+ int32_t i;
+ if (count != other.count) return FALSE;
+ if (comparer != NULL) {
+--- source/common/uvector.h
++++ source/common/uvector.h
+@@ -113,12 +113,12 @@
+ * equal if they are of the same size and all elements are equal,
+ * as compared using this object's comparer.
+ */
+- UBool operator==(const UVector& other);
++ UBool operator==(const UVector& other) const;
+
+ /**
+ * Equivalent to !operator==()
+ */
+- inline UBool operator!=(const UVector& other);
++ inline UBool operator!=(const UVector& other) const;
+
+ //------------------------------------------------------------
+ // java.util.Vector API
+@@ -382,7 +382,7 @@
+ return elementAt(index);
+ }
+
+-inline UBool UVector::operator!=(const UVector& other) {
++inline UBool UVector::operator!=(const UVector& other) const {
+ return !operator==(other);
+ }
+
+--- source/i18n/tzrule.cpp
++++ source/i18n/tzrule.cpp
+@@ -53,7 +53,7 @@
+ return *this;
+ }
+
+-UBool
++bool
+ TimeZoneRule::operator==(const TimeZoneRule& that) const {
+ return ((this == &that) ||
+ (typeid(*this) == typeid(that) &&
+@@ -120,7 +120,7 @@
+ return *this;
+ }
+
+-UBool
++bool
+ InitialTimeZoneRule::operator==(const TimeZoneRule& that) const {
+ return ((this == &that) ||
+ (typeid(*this) == typeid(that) &&
+@@ -226,7 +226,7 @@
+ return *this;
+ }
+
+-UBool
++bool
+ AnnualTimeZoneRule::operator==(const TimeZoneRule& that) const {
+ if (this == &that) {
+ return TRUE;
+@@ -445,7 +445,7 @@
+ return *this;
+ }
+
+-UBool
++bool
+ TimeArrayTimeZoneRule::operator==(const TimeZoneRule& that) const {
+ if (this == &that) {
+ return TRUE;
+--- source/i18n/unicode/rbtz.h
++++ source/i18n/unicode/rbtz.h
+@@ -85,6 +85,7 @@
+ * @stable ICU 3.8
+ */
+ virtual UBool operator!=(const TimeZone& that) const;
++ UBool operator!=(const RuleBasedTimeZone& that) const {return !operator==(that);}
+
+ /**
+ * Adds the <code>TimeZoneRule</code> which represents time transitions.
+--- source/i18n/unicode/simpletz.h
++++ source/i18n/unicode/simpletz.h
+@@ -110,6 +110,7 @@
+ * @stable ICU 2.0
+ */
+ virtual UBool operator==(const TimeZone& that) const;
++ UBool operator!=(const SimpleTimeZone& that) const {return !operator==(that);}
+
+ /**
+ * Constructs a SimpleTimeZone with the given raw GMT offset and time zone ID,
+--- source/i18n/unicode/smpdtfmt.h
++++ source/i18n/unicode/smpdtfmt.h
+@@ -874,6 +874,7 @@
+ * @stable ICU 2.0
+ */
+ virtual UBool operator==(const Format& other) const;
++ UBool operator!=(const SimpleDateFormat& that) const {return !operator==(that);}
+
+
+ using DateFormat::format;
+--- source/i18n/unicode/stsearch.h
++++ source/i18n/unicode/stsearch.h
+@@ -297,6 +297,7 @@
+ * @stable ICU 2.0
+ */
+ virtual UBool operator==(const SearchIterator &that) const;
++ UBool operator!=(const StringSearch &that) const {return !operator==(that);}
+
+ // public get and set methods ----------------------------------------
+
+--- source/i18n/unicode/tzrule.h
++++ source/i18n/unicode/tzrule.h
+@@ -54,7 +54,7 @@
+ * @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
+ * @stable ICU 3.8
+ */
+- virtual UBool operator==(const TimeZoneRule& that) const;
++ virtual bool operator==(const TimeZoneRule& that) const;
+
+ /**
+ * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
+@@ -245,7 +245,7 @@
+ * @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
+ * @stable ICU 3.8
+ */
+- virtual UBool operator==(const TimeZoneRule& that) const;
++ virtual bool operator==(const TimeZoneRule& that) const;
+
+ /**
+ * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
+@@ -255,6 +255,7 @@
+ * @stable ICU 3.8
+ */
+ virtual UBool operator!=(const TimeZoneRule& that) const;
++ UBool operator!=(const InitialTimeZoneRule& that) const {return !operator==(that);}
+
+ /**
+ * Gets the time when this rule takes effect in the given year.
+@@ -456,7 +457,7 @@
+ * @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
+ * @stable ICU 3.8
+ */
+- virtual UBool operator==(const TimeZoneRule& that) const;
++ virtual bool operator==(const TimeZoneRule& that) const;
+
+ /**
+ * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
+@@ -672,7 +673,7 @@
+ * @return true if the given <code>TimeZoneRule</code> objects are semantically equal.
+ * @stable ICU 3.8
+ */
+- virtual UBool operator==(const TimeZoneRule& that) const;
++ virtual bool operator==(const TimeZoneRule& that) const;
+
+ /**
+ * Return true if the given <code>TimeZoneRule</code> objects are semantically unequal. Objects
+--- source/i18n/unicode/vtzone.h
++++ source/i18n/unicode/vtzone.h
+@@ -81,6 +81,7 @@
+ * @stable ICU 3.8
+ */
+ virtual UBool operator!=(const TimeZone& that) const;
++ UBool operator!=(const VTimeZone& that) const {return !operator==(that);}
+
+ /**
+ * Create a <code>VTimeZone</code> instance by the time zone ID.