Add std::hash for V2 (Edge|Vertex)Accessor
Reviewers: mferencevic, mtomic Reviewed By: mferencevic Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2212
This commit is contained in:
parent
4e1c7c9e34
commit
e7b1d1aa0c
@ -55,3 +55,12 @@ class EdgeAccessor final {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace storage
|
} // namespace storage
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
template <>
|
||||||
|
struct hash<storage::EdgeAccessor> {
|
||||||
|
size_t operator()(const storage::EdgeAccessor &e) const {
|
||||||
|
return e.Gid().AsUint();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} // namespace std
|
||||||
|
@ -60,3 +60,12 @@ class VertexAccessor final {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace storage
|
} // namespace storage
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
template <>
|
||||||
|
struct hash<storage::VertexAccessor> {
|
||||||
|
size_t operator()(const storage::VertexAccessor &v) const {
|
||||||
|
return v.Gid().AsUint();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} // namespace std
|
||||||
|
Loading…
Reference in New Issue
Block a user