diff --git a/src/storage/v2/edge_accessor.hpp b/src/storage/v2/edge_accessor.hpp index 30f0af6f7..14a28d82c 100644 --- a/src/storage/v2/edge_accessor.hpp +++ b/src/storage/v2/edge_accessor.hpp @@ -55,3 +55,12 @@ class EdgeAccessor final { }; } // namespace storage + +namespace std { +template <> +struct hash { + size_t operator()(const storage::EdgeAccessor &e) const { + return e.Gid().AsUint(); + } +}; +} // namespace std diff --git a/src/storage/v2/vertex_accessor.hpp b/src/storage/v2/vertex_accessor.hpp index 3dfec2e32..079e1e258 100644 --- a/src/storage/v2/vertex_accessor.hpp +++ b/src/storage/v2/vertex_accessor.hpp @@ -60,3 +60,12 @@ class VertexAccessor final { }; } // namespace storage + +namespace std { +template <> +struct hash { + size_t operator()(const storage::VertexAccessor &v) const { + return v.Gid().AsUint(); + } +}; +} // namespace std