Fix operator==() generated for field of fixed sized array (#7749)

* Fix operator==() generated for field of fixed sized array

* Compare address

* noexcept

* Grammer

Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
Saman
2023-01-06 12:11:11 +08:00
committed by GitHub
parent 07d9485146
commit 74b5195089
5 changed files with 69 additions and 9 deletions

View File

@@ -88,7 +88,7 @@ FLATBUFFERS_STRUCT_END(Baz, 5);
inline bool operator==(const Baz &lhs, const Baz &rhs) {
return
(lhs.a() == rhs.a()) &&
(*lhs.a() == *rhs.a()) &&
(lhs.b() == rhs.b());
}
@@ -161,7 +161,7 @@ FLATBUFFERS_STRUCT_END(Bar, 16);
inline bool operator==(const Bar &lhs, const Bar &rhs) {
return
(lhs.a() == rhs.a()) &&
(*lhs.a() == *rhs.a()) &&
(lhs.b() == rhs.b());
}