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_set | |
| 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_set')
| -rw-r--r-- | libstdc++-v3/include/debug/unordered_set | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index f8517184023..09329b00367 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -286,6 +286,18 @@ namespace __debug unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) { __x.swap(__y); } + template<typename _Value, 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); } + + template<typename _Value, 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 == __y); } + /// Class std::unordered_multiset with safety/checking/debug instrumentation. template<typename _Value, @@ -521,6 +533,18 @@ namespace __debug unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) { __x.swap(__y); } + template<typename _Value, typename _Hash, typename _Pred, typename _Alloc> + inline bool + operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, + const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) + { return __x._M_equal(__y); } + + template<typename _Value, typename _Hash, typename _Pred, typename _Alloc> + inline bool + operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, + const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) + { return !(__x == __y); } + } // namespace __debug } // namespace std |

