From bbdf669bde57f1a2f8fa1a3d4fbb46b1e3c25a4c Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Thu, 4 Jul 2013 19:46:35 +0000 Subject: Simplify comparators of [unordered_][multi]map. This fixes http://llvm.org/bugs/show_bug.cgi?id=16538 llvm-svn: 185665 --- libcxx/include/unordered_map | 46 -------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'libcxx/include/unordered_map') diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map index 772c44b6f4b..cc30d763424 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -333,7 +333,6 @@ template ::value class __unordered_map_hasher : private _Hash { - typedef pair::type, _Tp> _Pp; typedef pair _Cp; public: _LIBCPP_INLINE_VISIBILITY @@ -347,9 +346,6 @@ public: _LIBCPP_INLINE_VISIBILITY const _Hash& hash_function() const _NOEXCEPT {return *this;} _LIBCPP_INLINE_VISIBILITY - size_t operator()(const _Pp& __x) const - {return static_cast(*this)(__x.first);} - _LIBCPP_INLINE_VISIBILITY size_t operator()(const _Cp& __x) const {return static_cast(*this)(__x.first);} _LIBCPP_INLINE_VISIBILITY @@ -362,7 +358,6 @@ class __unordered_map_hasher<_Key, _Tp, _Hash, false> { _Hash __hash_; - typedef pair::type, _Tp> _Pp; typedef pair _Cp; public: _LIBCPP_INLINE_VISIBILITY @@ -376,9 +371,6 @@ public: _LIBCPP_INLINE_VISIBILITY const _Hash& hash_function() const _NOEXCEPT {return __hash_;} _LIBCPP_INLINE_VISIBILITY - size_t operator()(const _Pp& __x) const - {return __hash_(__x.first);} - _LIBCPP_INLINE_VISIBILITY size_t operator()(const _Cp& __x) const {return __hash_(__x.first);} _LIBCPP_INLINE_VISIBILITY @@ -394,7 +386,6 @@ template ::value class __unordered_map_equal : private _Pred { - typedef pair::type, _Tp> _Pp; typedef pair _Cp; public: _LIBCPP_INLINE_VISIBILITY @@ -408,32 +399,14 @@ public: _LIBCPP_INLINE_VISIBILITY const _Pred& key_eq() const _NOEXCEPT {return *this;} _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Pp& __x, const _Pp& __y) const - {return static_cast(*this)(__x.first, __y.first);} - _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Pp& __x, const _Cp& __y) const - {return static_cast(*this)(__x.first, __y.first);} - _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Pp& __x, const _Key& __y) const - {return static_cast(*this)(__x.first, __y);} - _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Cp& __x, const _Pp& __y) const - {return static_cast(*this)(__x.first, __y.first);} - _LIBCPP_INLINE_VISIBILITY bool operator()(const _Cp& __x, const _Cp& __y) const {return static_cast(*this)(__x.first, __y.first);} _LIBCPP_INLINE_VISIBILITY bool operator()(const _Cp& __x, const _Key& __y) const {return static_cast(*this)(__x.first, __y);} _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Key& __x, const _Pp& __y) const - {return static_cast(*this)(__x, __y.first);} - _LIBCPP_INLINE_VISIBILITY bool operator()(const _Key& __x, const _Cp& __y) const {return static_cast(*this)(__x, __y.first);} - _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Key& __x, const _Key& __y) const - {return static_cast(*this)(__x, __y);} }; template @@ -441,7 +414,6 @@ class __unordered_map_equal<_Key, _Tp, _Pred, false> { _Pred __pred_; - typedef pair::type, _Tp> _Pp; typedef pair _Cp; public: _LIBCPP_INLINE_VISIBILITY @@ -455,32 +427,14 @@ public: _LIBCPP_INLINE_VISIBILITY const _Pred& key_eq() const _NOEXCEPT {return __pred_;} _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Pp& __x, const _Pp& __y) const - {return __pred_(__x.first, __y.first);} - _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Pp& __x, const _Cp& __y) const - {return __pred_(__x.first, __y.first);} - _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Pp& __x, const _Key& __y) const - {return __pred_(__x.first, __y);} - _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Cp& __x, const _Pp& __y) const - {return __pred_(__x.first, __y.first);} - _LIBCPP_INLINE_VISIBILITY bool operator()(const _Cp& __x, const _Cp& __y) const {return __pred_(__x.first, __y.first);} _LIBCPP_INLINE_VISIBILITY bool operator()(const _Cp& __x, const _Key& __y) const {return __pred_(__x.first, __y);} _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Key& __x, const _Pp& __y) const - {return __pred_(__x, __y.first);} - _LIBCPP_INLINE_VISIBILITY bool operator()(const _Key& __x, const _Cp& __y) const {return __pred_(__x, __y.first);} - _LIBCPP_INLINE_VISIBILITY - bool operator()(const _Key& __x, const _Key& __y) const - {return __pred_(__x, __y);} }; template -- cgit v1.2.3