mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 14:15:17 +00:00
Add --gen-absl-hash option to generate AbslHashValue for structs. (#8868)
This commit is contained in:
@@ -161,6 +161,10 @@ inline bool operator!=(const Struct &lhs, const Struct &rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
template <typename H>
|
||||
inline H AbslHashValue(H h, const Struct &obj) {
|
||||
return H::combine(std::move(h), obj.a(), obj.b());
|
||||
}
|
||||
|
||||
struct TableA FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef TableABuilder Builder;
|
||||
|
||||
Reference in New Issue
Block a user