Add util::any_hash

This commit is contained in:
Nikita Lisitsa 2021-07-13 11:43:03 +03:00
parent d9c454bc3b
commit 46d637328a

View file

@ -16,6 +16,17 @@ namespace psemek::util
seed = b * k;
}
struct any_hash
{
struct is_transparent{};
template <typename T>
std::size_t operator() (T const & x) const
{
return std::hash<T>{}(x);
}
};
}
namespace std