diff options
author | fdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-22 19:53:38 +0000 |
---|---|---|
committer | fdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-22 19:53:38 +0000 |
commit | 5b045227d27911ce3989cc333adac2a0e4c18f6e (patch) | |
tree | a2cf1c94b9e7e7849736885c79a89fe82bfc58d3 /libstdc++-v3/include/profile | |
parent | 3460f326a401b785f84b6b31c618274a38a510cd (diff) | |
download | gcc-5b045227d27911ce3989cc333adac2a0e4c18f6e.tar.gz |
2012-10-22 François Dumont <fdumont@gcc.gnu.org>
* include/bits/unordered_set.h (unordered_set<>): Prefer
aggregation to inheritance with _Hashtable.
(unordered_multiset<>): Likewise.
* include/debug/unordered_set (operator==): Adapt.
* include/profile/unordered_set (operator==): Adapt.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192695 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/profile')
-rw-r--r-- | libstdc++-v3/include/profile/unordered_set | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libstdc++-v3/include/profile/unordered_set b/libstdc++-v3/include/profile/unordered_set index 6385605f8ee..529454cf646 100644 --- a/libstdc++-v3/include/profile/unordered_set +++ b/libstdc++-v3/include/profile/unordered_set @@ -50,7 +50,7 @@ namespace __profile class unordered_set : public _GLIBCXX_STD_BASE { - typedef typename _GLIBCXX_STD_BASE _Base; + typedef _GLIBCXX_STD_BASE _Base; public: typedef typename _Base::size_type size_type; @@ -287,22 +287,22 @@ namespace __profile } }; - template<typename _Value, typename _Hash, typename _Pred, typename _Alloc> + template<typename _Key, typename _Hash, typename _Pred, typename _Alloc> inline void - swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, - unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) + swap(unordered_set<_Key, _Hash, _Pred, _Alloc>& __x, + unordered_set<_Key, _Hash, _Pred, _Alloc>& __y) { __x.swap(__y); } - template<typename _Value, typename _Hash, typename _Pred, typename _Alloc> + template<typename _Key, typename _Hash, typename _Pred, typename _Alloc> inline bool - operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, - const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) - { return __x._M_equal(__y); } + operator==(const unordered_set<_Key, _Hash, _Pred, _Alloc>& __x, + const unordered_set<_Key, _Hash, _Pred, _Alloc>& __y) + { return static_cast<const _GLIBCXX_STD_BASE&>(__x) == __y; } - template<typename _Value, typename _Hash, typename _Pred, typename _Alloc> + template<typename _Key, typename _Hash, typename _Pred, typename _Alloc> inline bool - operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, - const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) + operator!=(const unordered_set<_Key, _Hash, _Pred, _Alloc>& __x, + const unordered_set<_Key, _Hash, _Pred, _Alloc>& __y) { return !(__x == __y); } #undef _GLIBCXX_BASE @@ -318,7 +318,7 @@ namespace __profile class unordered_multiset : public _GLIBCXX_STD_BASE { - typedef typename _GLIBCXX_STD_BASE _Base; + typedef _GLIBCXX_STD_BASE _Base; public: typedef typename _Base::size_type size_type; @@ -559,7 +559,7 @@ namespace __profile inline bool operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) - { return __x._M_equal(__y); } + { return static_cast<const _GLIBCXX_STD_BASE&>(__x) == __y; } template<typename _Value, typename _Hash, typename _Pred, typename _Alloc> inline bool |