As pointed out in answers to Generic hash for tuples in unordered_map / unordered_set and elsewhere, Boost has an implementation of boost::hash<tuple<string, string>>
.
So, we can do things like:
#include <boost/functional/hash.hpp>
#include <boost/unordered_map.hpp>
std::tuple<string, string> t;
size_t bh = boost::hash<tuple<string, string>>{}(t);
boost::unordered_map<tuple<string, string>, int> bm;
but not:
size_t sh = std::hash<tuple<string, string>>{}(t); // error C2338: The C++ Standard doesn't provide a hash for this type.
std::unordered_map<tuple<string, string>, int> sm; // same error
Why didn't this make it into the C++ standard?
Extra points for references with a rationale given by the committee or other experts.