12
I'm guessing std::hash is defined as a template struct in order to avoid implicit type conversions done during overloaded function resolution. Is it a correct thing to say?
I mean, I would prefer to write
std::string s;
size_t hash = std::hash(s);
instead of
std::string s;
size_t hash = std::hash<std::string>()(s);
But I'm guessing there's a reason for why the standards committee has chosen the second option.