From f7c23f7fba47fe8a26aedcffbb0fcacf077a101c Mon Sep 17 00:00:00 2001 From: Zhicheng Wang <1627343141@qq.com> Date: Mon, 30 Jun 2025 19:50:34 +0800 Subject: [PATCH] fix std::hash & std::eq of some types --- network_process/interface/fwd_types.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/network_process/interface/fwd_types.hpp b/network_process/interface/fwd_types.hpp index 42df6a1..c9c3f81 100644 --- a/network_process/interface/fwd_types.hpp +++ b/network_process/interface/fwd_types.hpp @@ -207,6 +207,11 @@ struct polygon_face_t { namespace std { +template <> +struct hash { + size_t operator()(const compact_bg_mesh_coord_t& coord) const { return static_cast(coord.hashed_value); } +}; + template <> struct hash { size_t operator()(const vertex_header_t& v) const { return XXH3_64bits(&v, sizeof(vertex_header_t)); } @@ -256,7 +261,7 @@ template struct equal_to> { bool operator()(const pod_key_t& k1, const pod_key_t& k2) const { - return static_cast>(k1) == static_cast>(k2); + return static_cast>(k1) == static_cast>(k2); } }; } // namespace std