@@ -369,6 +369,7 @@ _NODISCARD bool operator==(const map<_Kty, _Ty, _Pr, _Alloc>& _Left, const map<_
369369 && _STD equal(_Left._Unchecked_begin(), _Left._Unchecked_end_iter(), _Right._Unchecked_begin());
370370}
371371
372+ #if !_HAS_CXX20 || __cpp_impl_three_way_comparison < 201902L
372373template <class _Kty, class _Ty, class _Pr, class _Alloc>
373374_NODISCARD bool operator!=(const map<_Kty, _Ty, _Pr, _Alloc>& _Left, const map<_Kty, _Ty, _Pr, _Alloc>& _Right) {
374375 return !(_Left == _Right);
@@ -394,6 +395,16 @@ template <class _Kty, class _Ty, class _Pr, class _Alloc>
394395_NODISCARD bool operator>=(const map<_Kty, _Ty, _Pr, _Alloc>& _Left, const map<_Kty, _Ty, _Pr, _Alloc>& _Right) {
395396 return !(_Left < _Right);
396397}
398+ #endif // !_HAS_CXX20 || __cpp_impl_three_way_comparison < 201902L
399+
400+ #if defined(__cpp_impl_three_way_comparison) && defined(__cpp_lib_concepts)
401+ template <class _Kty, class _Ty, class _Pr, class _Alloc>
402+ _NODISCARD _Synth_three_way_result<pair<const _Kty, _Ty>> operator<=>(
403+ const map<_Kty, _Ty, _Pr, _Alloc>& _Left, const map<_Kty, _Ty, _Pr, _Alloc>& _Right) {
404+ return _STD lexicographical_compare_three_way(_Left._Unchecked_begin(), _Left._Unchecked_end_iter(),
405+ _Right._Unchecked_begin(), _Right._Unchecked_end_iter(), _Synth_three_way{});
406+ }
407+ #endif // defined(__cpp_impl_three_way_comparison) && defined(__cpp_lib_concepts)
397408
398409template <class _Kty, class _Ty, class _Pr, class _Alloc>
399410void swap(map<_Kty, _Ty, _Pr, _Alloc>& _Left, map<_Kty, _Ty, _Pr, _Alloc>& _Right) noexcept(
@@ -557,6 +568,7 @@ _NODISCARD bool operator==(
557568 && _STD equal(_Left._Unchecked_begin(), _Left._Unchecked_end_iter(), _Right._Unchecked_begin());
558569}
559570
571+ #if !_HAS_CXX20 || __cpp_impl_three_way_comparison < 201902L
560572template <class _Kty, class _Ty, class _Pr, class _Alloc>
561573_NODISCARD bool operator!=(
562574 const multimap<_Kty, _Ty, _Pr, _Alloc>& _Left, const multimap<_Kty, _Ty, _Pr, _Alloc>& _Right) {
@@ -587,6 +599,16 @@ _NODISCARD bool operator>=(
587599 const multimap<_Kty, _Ty, _Pr, _Alloc>& _Left, const multimap<_Kty, _Ty, _Pr, _Alloc>& _Right) {
588600 return !(_Left < _Right);
589601}
602+ #endif // !_HAS_CXX20 || __cpp_impl_three_way_comparison < 201902L
603+
604+ #if defined(__cpp_impl_three_way_comparison) && defined(__cpp_lib_concepts)
605+ template <class _Kty, class _Ty, class _Pr, class _Alloc>
606+ _NODISCARD _Synth_three_way_result<pair<const _Kty, _Ty>> operator<=>(
607+ const multimap<_Kty, _Ty, _Pr, _Alloc>& _Left, const multimap<_Kty, _Ty, _Pr, _Alloc>& _Right) {
608+ return _STD lexicographical_compare_three_way(_Left._Unchecked_begin(), _Left._Unchecked_end_iter(),
609+ _Right._Unchecked_begin(), _Right._Unchecked_end_iter(), _Synth_three_way{});
610+ }
611+ #endif // defined(__cpp_impl_three_way_comparison) && defined(__cpp_lib_concepts)
590612
591613template <class _Kty, class _Ty, class _Pr, class _Alloc>
592614void swap(multimap<_Kty, _Ty, _Pr, _Alloc>& _Left, multimap<_Kty, _Ty, _Pr, _Alloc>& _Right) noexcept(
0 commit comments