Align base::hash_map with C++11, part 2.
MSVC's stdext::hash_map, unlike C++11's std::unordered_map and GCC's
__gnu_cxx::hash_map, requires a total order on the key. It also has a very
different syntax for supplying a default hash function.
Switch MSVC to std::unordered_map, but exposed as base::hash_map. This aligns
both the container and the default hash function. The default hash function now
differs from our GCC one in that const char * is no longer hashed as a C string.
To align GCC with C++11 semantics and the MSVC ones this CL introduces, also
provide a new hash function and swap the default hash with it. This new
function is identical to __gnu_cxx::hash, but it does not specialize const
char* and does specialize T* (which was already aligned by
https://codereview.chromium.org/630503002/).
Note: This CL changes a file in mojo/ and will need to be mirrored in the
mojo repository before the next sync.
BUG=420242
Review URL: https://codereview.chromium.org/623383002
Cr-Commit-Position: refs/heads/master@{#301185}
20 files changed