From 401b06663f14a4c6f0488e72fbb5e3b062aecbeb Mon Sep 17 00:00:00 2001 From: joaquintides Date: Thu, 30 May 2024 09:11:06 +0200 Subject: [PATCH] forced a compile error when Hash::is_avalanching is not a type --- include/boost/unordered/hash_traits.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/unordered/hash_traits.hpp b/include/boost/unordered/hash_traits.hpp index f6b912b7..5e2b1af0 100644 --- a/include/boost/unordered/hash_traits.hpp +++ b/include/boost/unordered/hash_traits.hpp @@ -42,6 +42,12 @@ struct hash_is_avalanching_impl< avalanching_value::value >{}; +template +struct hash_is_avalanching_impl< + Hash, + typename std::enable_if<((void)Hash::is_avalanching,true)>::type +>{}; /* Hash::is_avalanching is not a type: compile error downstream */ + } /* namespace detail */ /* Each trait can be partially specialized by users for concrete hash functions