message: Fix ambiguous overloaded operator== in C++20
  Polymorphic comparison operators doesn't work in C++20.
  (-Wambiguous-reversed-operator)
  Fix this issue by using the non-virtual interface pattern.
  Cr-Commit-Position: refs/heads/main@{#38210}
diff: @@ -258,7 +258,9 @@ class RTCStatsMemberInterface {
  virtual std::vector<NonStandardGroupId> group_ids() const { return {}; }
  // Type and value comparator. The names are not compared. These operators are
  // exposed for testing.
  - virtual bool operator==(const RTCStatsMemberInterface& other) const = 0;
  + bool operator==(const RTCStatsMemberInterface& other) const {
  + return IsEqual(other);
  + }
  bool operator!=(const RTCStatsMemberInterface& other) const {
  return !(*this == other);
  }
  @@ -280,6 +282,8 @@ class RTCStatsMemberInterface {
  RTCStatsMemberInterface(const char* name, bool is_defined)
  : name_(name), is_defined_(is_defined) {}
  + virtual bool IsEqual(const RTCStatsMemberInterface& other) const = 0;
  +
  const char* const name_;
  bool is_defined_;
  };
  @@ -309,17 +313,6 @@ class RTCStatsMember : public RTCStatsMemberInterface {
  bool is_sequence() const override;
  bool is_string() const override;
  bool is_standardized() const override { return true; }
  - bool operator==(const RTCStatsMemberInterface& other) const override {
  - if (type() != other.type() || is_standardized() != other.is_standardized())
  - return false;
  - const RTCStatsMember<T>& other_t =
  - static_cast<const RTCStatsMember<T>&>(other);
  - if (!is_defined_)
  - return !other_t.is_defined();
  - if (!other.is_defined())
  - return false;
  - return value_ == other_t.value_;
  - }
  std::string ValueToString() const override;
  std::string ValueToJson() const override;
  @@ -363,6 +356,19 @@ class RTCStatsMember : public RTCStatsMemberInterface {
  return &value_;
  }
  + protected:
  + bool IsEqual(const RTCStatsMemberInterface& other) const override {
  + if (type() != other.type() || is_standardized() != other.is_standardized())
  + return false;
  + const RTCStatsMember<T>& other_t =
  + static_cast<const RTCStatsMember<T>&>(other);
  + if (!is_defined_)
  + return !other_t.is_defined();
  + if (!other.is_defined())
  + return false;
  + return value_ == other_t.value_;
  + }
  +
  private:
  T value_;
  };
  