From a1572260fb231d0c7f7ea6d95f7972662eda380a Mon Sep 17 00:00:00 2001 From: mckay Date: Tue, 24 Jun 2025 16:22:55 +0800 Subject: [PATCH] =?UTF-8?q?C++=20=E4=B8=8D=E5=85=81=E8=AE=B8=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=AF=B9=20std::array=20=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=20static=5Fcast=20=E5=88=B0=20std::array=EF=BC=8C?= =?UTF-8?q?=E5=8D=B3=E4=BD=BF=20T1=20=E5=92=8C=20T2=20=E6=98=AF=E5=8F=AF?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E7=B1=BB=E5=9E=8B=E3=80=82=20=E6=94=B9?= =?UTF-8?q?=E6=88=90=E6=98=BE=E5=BC=8F=E5=9C=B0=E6=8A=8A=E6=AF=8F=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=20unsigned=20long=20long=20=E5=85=83=E7=B4=A0?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E4=B8=BA=20uint32=5Ft?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 ce04a2c..949ac11 100644 --- a/network_process/interface/fwd_types.hpp +++ b/network_process/interface/fwd_types.hpp @@ -267,7 +267,12 @@ template struct equal_to> { bool operator()(const pod_key_t& k1, const pod_key_t& k2) const { - return static_cast>(k1) == static_cast>(k2); + std::array a, b; + for (size_t i = 0; i < N; ++i) { + a[i] = static_cast(k1[i]); + b[i] = static_cast(k2[i]); + } + return a == b; } }; } // namespace std \ No newline at end of file