frederick-vs-ja commented on code in PR #13874:
URL: https://github.com/apache/arrow/pull/13874#discussion_r945827384
##########
cpp/src/arrow/util/compare.h:
##########
@@ -54,6 +54,10 @@ class EqualityComparable {
bool operator==(const T& other) const { return cast().Equals(other); }
bool operator!=(const T& other) const { return !(cast() == other); }
+ friend bool operator==(const T& a, const T& b) {
+ return a.Equals(b);
+ }
Review Comment:
Perhaps we can only use hidden friends.
```suggestion
friend bool operator==(const T& a, const T& b) {
return a.Equals(b);
}
friend bool operator!=(const T& a, const T& b) {
return !(a.Equals(b));
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]