Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(582)

Unified Diff: tools/gn/label_ptr.h

Issue 612323010: Align base::hash_map with C++11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try a different tack for C++ insanity Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/gn/label_ptr.h
diff --git a/tools/gn/label_ptr.h b/tools/gn/label_ptr.h
index 4f1a54f10987660858edd599f30424c8feef5891..89a39a6ab482e9d0de6dc7406514398e6e3f347d 100644
--- a/tools/gn/label_ptr.h
+++ b/tools/gn/label_ptr.h
@@ -105,19 +105,12 @@ template<typename T> inline bool operator<(const LabelPtrPair<T>& a,
namespace BASE_HASH_NAMESPACE {
-#if defined(COMPILER_GCC)
template<typename T> struct hash< LabelPtrPair<T> > {
std::size_t operator()(const LabelPtrPair<T>& v) const {
BASE_HASH_NAMESPACE::hash<Label> h;
return h(v.label);
}
};
-#elif defined(COMPILER_MSVC)
-template<typename T>
-inline size_t hash_value(const LabelPtrPair<T>& v) {
- return BASE_HASH_NAMESPACE::hash_value(v.label);
-}
-#endif // COMPILER...
} // namespace BASE_HASH_NAMESPACE

Powered by Google App Engine
This is Rietveld 408576698