Skip to content

Commit

Permalink
Fix sub_match <=> basic_string with custom traits/allocators (#4253)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej authored Dec 14, 2023
1 parent 7276976 commit c293fe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stl/inc/regex
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ _NODISCARD bool operator==(
_EXPORT_STD template <class _BidIt, class _Traits, class _Alloc>
_NODISCARD auto operator<=>(
const sub_match<_BidIt>& _Left, const basic_string<_Iter_value_t<_BidIt>, _Traits, _Alloc>& _Right) {
return static_cast<sub_match<_BidIt>::_Comparison_category>(_Left.compare(_Right) <=> 0);
return static_cast<sub_match<_BidIt>::_Comparison_category>(_Left._Compare(_Right.data(), _Right.size()) <=> 0);
}
#else // ^^^ _HAS_CXX20 / !_HAS_CXX20 vvv
template <class _BidIt, class _Traits, class _Alloc>
Expand Down

0 comments on commit c293fe7

Please sign in to comment.