Add util::any_hash
This commit is contained in:
parent
d9c454bc3b
commit
46d637328a
1 changed files with 11 additions and 0 deletions
|
|
@ -16,6 +16,17 @@ namespace psemek::util
|
||||||
seed = b * k;
|
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
|
namespace std
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue