@@ -369,11 +369,21 @@ _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
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);
375376}
377+ #endif // !_HAS_CXX20
376378
379+ #ifdef __cpp_lib_concepts
380+ template <class _Kty, class _Ty, class _Pr, class _Alloc>
381+ _NODISCARD _Synth_three_way_result<pair<const _Kty, _Ty>> operator<=>(
382+ const map<_Kty, _Ty, _Pr, _Alloc>& _Left, const map<_Kty, _Ty, _Pr, _Alloc>& _Right) {
383+ return _STD lexicographical_compare_three_way(_Left._Unchecked_begin(), _Left._Unchecked_end_iter(),
384+ _Right._Unchecked_begin(), _Right._Unchecked_end_iter(), _Synth_three_way{});
385+ }
386+ #else // __cpp_lib_concepts
377387template <class _Kty, class _Ty, class _Pr, class _Alloc>
378388_NODISCARD bool operator<(const map<_Kty, _Ty, _Pr, _Alloc>& _Left, const map<_Kty, _Ty, _Pr, _Alloc>& _Right) {
379389 return _STD lexicographical_compare(
@@ -394,6 +404,7 @@ template <class _Kty, class _Ty, class _Pr, class _Alloc>
394404_NODISCARD bool operator>=(const map<_Kty, _Ty, _Pr, _Alloc>& _Left, const map<_Kty, _Ty, _Pr, _Alloc>& _Right) {
395405 return !(_Left < _Right);
396406}
407+ #endif // __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,12 +568,22 @@ _NODISCARD bool operator==(
557568 && _STD equal(_Left._Unchecked_begin(), _Left._Unchecked_end_iter(), _Right._Unchecked_begin());
558569}
559570
571+ #if !_HAS_CXX20
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) {
563575 return !(_Left == _Right);
564576}
577+ #endif // !_HAS_CXX20
565578
579+ #ifdef __cpp_lib_concepts
580+ template <class _Kty, class _Ty, class _Pr, class _Alloc>
581+ _NODISCARD _Synth_three_way_result<pair<const _Kty, _Ty>> operator<=>(
582+ const multimap<_Kty, _Ty, _Pr, _Alloc>& _Left, const multimap<_Kty, _Ty, _Pr, _Alloc>& _Right) {
583+ return _STD lexicographical_compare_three_way(_Left._Unchecked_begin(), _Left._Unchecked_end_iter(),
584+ _Right._Unchecked_begin(), _Right._Unchecked_end_iter(), _Synth_three_way{});
585+ }
586+ #else // __cpp_lib_concepts
566587template <class _Kty, class _Ty, class _Pr, class _Alloc>
567588_NODISCARD bool operator<(
568589 const multimap<_Kty, _Ty, _Pr, _Alloc>& _Left, const multimap<_Kty, _Ty, _Pr, _Alloc>& _Right) {
@@ -587,6 +608,7 @@ _NODISCARD bool operator>=(
587608 const multimap<_Kty, _Ty, _Pr, _Alloc>& _Left, const multimap<_Kty, _Ty, _Pr, _Alloc>& _Right) {
588609 return !(_Left < _Right);
589610}
611+ #endif // __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