Align base::hash_map with C++11, part 1.
commit254bd40b3f63b8d1e484a5c88a2255681ea54e45
authordavidben <davidben@chromium.org>
Sat, 11 Oct 2014 00:13:57 +0000 (10 17:13 -0700)
committerCommit bot <commit-bot@chromium.org>
Sat, 11 Oct 2014 00:14:14 +0000 (11 00:14 +0000)
treec75dfd0f1160ba33aab3cdef30fbbcca8b2bce46
parent45097b2058e1a0d5049c9b7789a91aa9ea4f09ae
Align base::hash_map with C++11, part 1.

C++11's std::hash provides a default hash for T* that hashes by pointer value.
So does MSVC's stdext::hash_value, but not GCC's __gnu_cxx::hash (and STLPort's
std::hash). To align non-MSVC with both MSVC and the standard, provide a
default hash for pointers. This removes a lot of GCC-specific hash definitions.

Confusingly, all three provide a default hash for const char * that hashes as C
string, while not changing their equality. This CL does not change this on any
platform.

BUG=420242

Review URL: https://codereview.chromium.org/630503002

Cr-Commit-Position: refs/heads/master@{#299217}
16 files changed:
base/containers/hash_tables.h
base/debug/trace_event_impl.h
base/memory/discardable_memory_manager.h
cc/resources/prioritized_resource_manager.h
cc/trees/layer_sorter.h
cc/trees/layer_tree_impl.h
chrome/browser/download/chrome_download_manager_delegate.h
chrome/browser/profiles/profile.h
chrome/browser/safe_browsing/protocol_manager.h
content/browser/manifest/manifest_manager_host.h
content/child/npapi/np_channel_base.h
content/common/gpu/gpu_memory_manager_unittest.cc
content/public/browser/browser_context.h
gpu/command_buffer/service/async_pixel_transfer_manager.h
net/quic/quic_ack_notifier_manager.h
tools/gn/target.h