diff --git a/tests/hash_generator_testing.h b/tests/hash_generator_testing.h index d43ec2e..6997c1d 100644 --- a/tests/hash_generator_testing.h +++ b/tests/hash_generator_testing.h @@ -26,6 +26,7 @@ #include #include #include +#include #if PHMAP_HAVE_STD_STRING_VIEW #include @@ -193,4 +194,22 @@ using GeneratedType = decltype( } // namespace container_internal } // namespace phmap +namespace std +{ + using phmap::container_internal::hash_internal::EnumClass; + using phmap::container_internal::hash_internal::Enum; + + template<> + struct hash + { + std::size_t operator()(EnumClass const &p) const { return (std::size_t)p; } + }; + template<> + struct hash + { + std::size_t operator()(Enum const &p) const { return (std::size_t)p; } + }; +} + + #endif // PHMAP_CONTAINER_INTERNAL_HASH_GENERATOR_TESTING_H_