Replace unary_function inheritance (which was never required,
even in C++98) with argument_type and result_type typedefs.
This increases portability, as unary_function was removed in C++17
and MSVC has implemented that removal.
Fixes D45596.
llvm-svn: 329974
template <class T>
struct hash<Counter<T> >
- : public std::unary_function<Counter<T>, std::size_t>
{
+ typedef Counter<T> argument_type;
+ typedef std::size_t result_type;
+
std::size_t operator()(const Counter<T>& x) const {return std::hash<T>(x.get());}
};
}