From ff075f38f03ab28f1e2334014cf5ffbe01b10f47 Mon Sep 17 00:00:00 2001 From: greg Date: Tue, 26 Mar 2019 08:47:36 -0400 Subject: [PATCH] fix last ubuntu xenial build issue --- tests/hash_generator_testing.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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_