|
17 | 17 | #ifndef _M_CEE_PURE |
18 | 18 | #include <atomic> |
19 | 19 | #include <compare> |
20 | | -#endif |
| 20 | +#endif // _M_CEE_PURE |
21 | 21 |
|
22 | 22 | #pragma pack(push, _CRT_PACKING) |
23 | 23 | #pragma warning(push, _STL_WARNING_LEVEL) |
@@ -100,7 +100,7 @@ public: |
100 | 100 | // TRANSITION, GH-489 |
101 | 101 | #ifdef __cpp_lib_concepts |
102 | 102 | _NODISCARD strong_ordering operator<=>(const error_category& _Right) const noexcept { |
103 | | - return compare_three_way()(this, &_Right); |
| 103 | + return compare_three_way{}(_Addr, _Right._Addr); |
104 | 104 | } |
105 | 105 | #else // ^^^ defined(__cpp_lib_concepts) / !defined(__cpp_lib_concepts) vvv |
106 | 106 | _NODISCARD bool operator<(const error_category& _Right) const noexcept { |
@@ -186,7 +186,7 @@ public: |
186 | 186 | // TRANSITION, GH-489 |
187 | 187 | #ifdef __cpp_lib_concepts |
188 | 188 | _NODISCARD friend strong_ordering operator<=>(const error_code& _Left, const error_code& _Right) noexcept { |
189 | | - if (auto _Result = _Left.category() <=> _Right.category(); _Result != 0) { |
| 189 | + if (const auto _Result = _Left.category() <=> _Right.category(); _Result != 0) { |
190 | 190 | return _Result; |
191 | 191 | } |
192 | 192 | return _Left.value() <=> _Right.value(); |
@@ -274,7 +274,7 @@ public: |
274 | 274 | #ifdef __cpp_lib_concepts |
275 | 275 | _NODISCARD friend strong_ordering operator<=>( |
276 | 276 | const error_condition& _Left, const error_condition& _Right) noexcept { |
277 | | - if (auto _Result = _Left.category() <=> _Right.category(); _Result != 0) { |
| 277 | + if (const auto _Result = _Left.category() <=> _Right.category(); _Result != 0) { |
278 | 278 | return _Result; |
279 | 279 | } |
280 | 280 | return _Left.value() <=> _Right.value(); |
|
0 commit comments