-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
The compiler bugs that we reported as Microsoft-internal VSO-905257 and VSO-1070391 were resolved as fixed in VS 2019 16.7 Preview 1. When that's available, we should remove the following workarounds in our tests:
STL/tests/std/tests/P0896R4_P1614R2_comparisons/test.cpp
Lines 261 to 277 in 0cbd1b2
| #if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-905257 | |
| STATIC_ASSERT(test_compare_three_way<int, int, strong_ordering>()); | |
| STATIC_ASSERT(test_compare_three_way<int, long, strong_ordering>()); | |
| STATIC_ASSERT(test_compare_three_way<float, float, partial_ordering>()); | |
| STATIC_ASSERT(test_compare_three_way<float, double, partial_ordering>()); | |
| STATIC_ASSERT(test_compare_three_way<long, double, partial_ordering>()); | |
| STATIC_ASSERT(test_compare_three_way<bool, int, void>()); | |
| STATIC_ASSERT(test_compare_three_way<some_enum, some_enum, strong_ordering>()); | |
| STATIC_ASSERT(test_compare_three_way<some_enum, int, void>()); | |
| STATIC_ASSERT(test_compare_three_way<int*, int*, strong_ordering>()); | |
| STATIC_ASSERT(test_compare_three_way<int*, void*, strong_ordering>()); | |
| STATIC_ASSERT(test_compare_three_way<int (*)(), int (*)(), void>()); | |
| STATIC_ASSERT(test_compare_three_way<int (*)(), void (*)(), void>()); | |
| #endif // TRANSITION, VSO-905257 |
STL/tests/std/tests/P0896R4_P1614R2_comparisons/test.cpp
Lines 300 to 312 in 0cbd1b2
| template <class T, class U, class R> | |
| constexpr void assert_three_way(T const& t, U const& u, R const result) { // TRANSITION, VSO-905257 | |
| #if !defined(__clang__) && !defined(__EDG__) | |
| // <=> expressions that resolve to builtin operators are incorrectly lvalues of const-qualified type on MSVC, so | |
| // they are rejected by std::three_way_comparable and std::three_way_comparable_with. | |
| if constexpr (!std::is_class_v<std::remove_cvref_t<T>> && !std::is_class_v<std::remove_cvref_t<U>>) { | |
| return; | |
| } else | |
| #endif // !defined(__clang__) && !defined(__EDG__) | |
| { | |
| assert(compare_three_way{}(t, u) == result); | |
| } | |
| } |
STL/tests/std/tests/P0896R4_P1614R2_comparisons/test.cpp
Lines 506 to 508 in 0cbd1b2
| #if defined(__clang__) || defined(__EDG__) // TRANSITION, VSO-1070391 | |
| test_equality_comparable(&has_members::f, &has_members::g, strong_ordering::less); // Ditto "not equal" | |
| #endif // TRANSITION, VSO-1070391 |
Reactions are currently unavailable