Skip to content

Commit a9d8f3e

Browse files
committed
add compare
1 parent 5bf2f2d commit a9d8f3e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

stl/inc/xstring

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#include <xpolymorphic_allocator.h>
1818
#endif // _HAS_CXX17
1919

20+
#if _HAS_CXX20
21+
#include <compare>
22+
#endif // _HAS_CXX20
23+
2024
#pragma pack(push, _CRT_PACKING)
2125
#pragma warning(push, _STL_WARNING_LEVEL)
2226
#pragma warning(disable : _STL_DISABLED_WARNINGS)
@@ -39,7 +43,7 @@ struct _Char_traits { // properties of a string or stream element
3943
using pos_type = streampos;
4044
using off_type = streamoff;
4145
using state_type = _Mbstatet;
42-
using comparison_category = strong_ordering;
46+
using comparison_category = _Comparison_category_strong;
4347

4448
// For copy/move, we can uniformly call memcpy/memmove (or their builtin versions) for all element types.
4549

@@ -218,7 +222,7 @@ public:
218222
using pos_type = streampos;
219223
using off_type = streamoff;
220224
using state_type = mbstate_t;
221-
using comparison_category = strong_ordering;
225+
using comparison_category = _Comparison_category_strong;
222226

223227
using _Primary_char_traits::_Copy_s;
224228
using _Primary_char_traits::copy;
@@ -357,7 +361,7 @@ public:
357361
using pos_type = streampos;
358362
using off_type = streamoff;
359363
using state_type = mbstate_t;
360-
using comparison_category = strong_ordering;
364+
using comparison_category = _Comparison_category_strong;
361365

362366
using _Primary_char_traits::_Copy_s;
363367
using _Primary_char_traits::copy;

0 commit comments

Comments
 (0)