From c295af9bd5d3aa73910220866fe5d72a28beeaee Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 20 May 2026 23:10:25 +0300 Subject: [PATCH] BAN: Fix HashMaps with custom hashes and comparators --- BAN/include/BAN/HashMap.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BAN/include/BAN/HashMap.h b/BAN/include/BAN/HashMap.h index f78cc929..0a1af45a 100644 --- a/BAN/include/BAN/HashMap.h +++ b/BAN/include/BAN/HashMap.h @@ -98,7 +98,8 @@ namespace BAN struct EntryHash { - constexpr bool operator()(const Key& a) + template U> + constexpr bool operator()(const U& a) { return HASH()(a); } @@ -110,7 +111,8 @@ namespace BAN struct EntryComp { - constexpr bool operator()(const Entry& a, const Key& b) + template U> + constexpr bool operator()(const Entry& a, const U& b) { return COMP()(a.key, b); }