diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-26 02:19:10 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-26 02:19:10 +0000 |
| commit | 84f30fd1121faf45a5321769c9998699e15ce17a (patch) | |
| tree | 06a7073a79a6845868ab73273d19c6bb49d0db35 /libstdc++-v3/include/debug/unordered_map | |
| parent | 2757fefd77714637a36220ca98975f449c2eb7da (diff) | |
| download | ppe42-gcc-84f30fd1121faf45a5321769c9998699e15ce17a.tar.gz ppe42-gcc-84f30fd1121faf45a5321769c9998699e15ce17a.zip | |
2010-03-25 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/unordered_map.h (operator==, operator!=): Add per N3068.
* include/bits/unordered_set.h (operator==, operator!=): Likewise.
* include/debug/unordered_map (operator==, operator!=): Likewise.
* include/debug/unordered_set: Likewise.
* include/profile/unordered_map: Likewise.
* include/profile/unordered_set: Likewise.
* testsuite/23_containers/unordered_map/operators/1.cc: New.
* testsuite/23_containers/unordered_multimap/operators/1.cc: Likewise.
* testsuite/23_containers/unordered_multimap/operators/2.cc: Likewise.
* testsuite/23_containers/unordered_set/operators/1.cc: Likewise.
* testsuite/23_containers/unordered_multiset/operators/1.cc: Likewise.
2010-03-25 John Lakos <jlakos@bloomberg.net>
Pablo Halpern <phalpern@halpernwightsoftware.com>
Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/hashtable_policy.h (struct _Equality_base): Add.
* include/bits/hashtable.h (_Hashtable<>): Derive from the latter.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157736 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/debug/unordered_map')
| -rw-r--r-- | libstdc++-v3/include/debug/unordered_map | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index a5e6174fe6a..6fef1e97057 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -287,6 +287,20 @@ namespace __debug unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) { __x.swap(__y); } + template<typename _Key, typename _Tp, typename _Hash, + typename _Pred, typename _Alloc> + inline bool + operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + { return __x._M_equal(__y); } + + template<typename _Key, typename _Tp, typename _Hash, + typename _Pred, typename _Alloc> + inline bool + operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + { return !(__x == __y); } + /// Class std::unordered_multimap with safety/checking/debug instrumentation. template<typename _Key, typename _Tp, @@ -524,6 +538,20 @@ namespace __debug unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) { __x.swap(__y); } + template<typename _Key, typename _Tp, typename _Hash, + typename _Pred, typename _Alloc> + inline bool + operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + { return __x._M_equal(__y); } + + template<typename _Key, typename _Tp, typename _Hash, + typename _Pred, typename _Alloc> + inline bool + operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, + const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) + { return !(__x == __y); } + } // namespace __debug } // namespace std |

