KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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.
Tags (comma-separated)
Save Edits
Cancel