diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-04-19 21:04:40 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-04-19 21:05:32 +0100 |
commit | 7ab9c2430ffb13de8433aa7d654192b5d2b1e7a9 (patch) | |
tree | 500ebcdeffe50881b667cd80178e1384c16550ef /libstdc++-v3/include/debug | |
parent | a2c0fa35d0dc8912b0c1a658234221de61e60840 (diff) |
libstdc++: Remove operator!= overloads for unordered containers
Some more C++20 changes from P1614R2, "The Mothership has Landed".
* include/bits/unordered_map.h (unordered_map, unordered_multimap):
Remove redundant operator!= for C++20.
* include/bits/unordered_set.h (unordered_set, unordered_multiset):
Likewise.
* include/debug/unordered_map (unordered_map, unordered_multimap):
Likewise.
* include/debug/unordered_set (unordered_set, unordered_multiset):
Likewise.
Diffstat (limited to 'libstdc++-v3/include/debug')
-rw-r--r-- | libstdc++-v3/include/debug/unordered_map | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/unordered_set | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index 7be1d2ee952..17fbba3aade 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -741,13 +741,14 @@ namespace __debug const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) { return __x._M_base() == __y._M_base(); } +#if __cpp_impl_three_way_comparison < 201907L 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); } - +#endif /// Class std::unordered_multimap with safety/checking/debug instrumentation. template<typename _Key, typename _Tp, @@ -1347,12 +1348,14 @@ namespace __debug const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y) { return __x._M_base() == __y._M_base(); } +#if __cpp_impl_three_way_comparison < 201907L 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); } +#endif } // namespace __debug } // namespace std diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index 9941bbe1c24..4d30852186c 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -612,12 +612,13 @@ namespace __debug const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) { return __x._M_base() == __y._M_base(); } +#if __cpp_impl_three_way_comparison < 201907L 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); } - +#endif /// Class std::unordered_multiset with safety/checking/debug instrumentation. template<typename _Value, @@ -1176,11 +1177,13 @@ namespace __debug const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) { return __x._M_base() == __y._M_base(); } +#if __cpp_impl_three_way_comparison < 201907L 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); } +#endif } // namespace __debug } // namespace std |