diff --git a/network_process/interface/fwd_types.hpp b/network_process/interface/fwd_types.hpp index 94cc6db..ce04a2c 100644 --- a/network_process/interface/fwd_types.hpp +++ b/network_process/interface/fwd_types.hpp @@ -227,6 +227,17 @@ struct hash> { size_t operator()(const pod_key_t& k) const { return XXH3_64bits(&k, sizeof(pod_key_t)); } }; +template <> +struct hash { + using argument_type = compact_bg_mesh_coord_t; + using result_type = size_t; + + result_type operator()(const argument_type& coord) const noexcept { + // 使用 uint64_t 的哈希算法,将 hashed_value 映射为 size_t + return static_cast(std::hash()(coord.hashed_value)); + } +}; + template <> struct equal_to { bool operator()(const vertex_header_t& v1, const vertex_header_t& v2) const