diff --git a/stl/inc/xutility b/stl/inc/xutility index 9c82bb27c55..b67ee654df1 100644 --- a/stl/inc/xutility +++ b/stl/inc/xutility @@ -815,44 +815,34 @@ concept sized_sentinel_for = sentinel_for<_Se, _It> // clang-format on // ALIAS TEMPLATE _Iter_concept -template >> -struct _Iter_concept_impl {}; - -// clang-format off -template - requires _Has_member_iterator_concept> -struct _Iter_concept_impl<_It, false> { - using type = typename iterator_traits<_It>::iterator_concept; -}; - -template - requires (!_Has_member_iterator_concept> - && _Has_member_iterator_category>) -struct _Iter_concept_impl<_It, false> { - using type = typename iterator_traits<_It>::iterator_category; +template +struct _Iter_concept_impl2 { + template + using _Apply = typename _Traits::iterator_category; }; -// clang-format on - -template -struct _Iter_concept_impl<_It, true> { - using type = random_access_iterator_tag; +template <> +struct _Iter_concept_impl2 { + // clang-format off + template + requires _Is_from_primary> + using _Apply = random_access_iterator_tag; + // clang-format on }; -template <_Has_member_iterator_concept _It> -struct _Iter_concept_impl<_It, true> { - using type = typename _It::iterator_concept; +template +struct _Iter_concept_impl1 { + template + using _Apply = typename _Traits::iterator_concept; }; - -// clang-format off -template - requires(!_Has_member_iterator_concept<_It> && _Has_member_iterator_category<_It>) -struct _Iter_concept_impl<_It, true> { - using type = typename _It::iterator_category; +template <> +struct _Iter_concept_impl1 { + template + using _Apply = typename _Iter_concept_impl2<_Has_member_iterator_category<_Traits>>::template _Apply<_It, _Traits>; }; -// clang-format on -template -using _Iter_concept = typename _Iter_concept_impl<_It>::type; +template >, _It, iterator_traits<_It>>> +using _Iter_concept = + typename _Iter_concept_impl1<_Has_member_iterator_concept<_Traits>>::template _Apply<_It, _Traits>; // clang-format off // CONCEPT input_iterator @@ -4090,14 +4080,24 @@ public: return _Left._Current - _Right._Get_last(); } - _NODISCARD friend constexpr reference iter_move(const move_iterator& _It) noexcept( - noexcept(_RANGES iter_move(_It._Current))) { + _NODISCARD friend constexpr reference iter_move(const move_iterator& _It) +#ifdef __EDG__ // TRANSITION, VSO-1132105 + noexcept(noexcept(_RANGES iter_move(_STD declval()))) +#else // ^^^ workaround / no workaround vvv + noexcept(noexcept(_RANGES iter_move(_It._Current))) +#endif // TRANSITION, VSO-1132105 + { return _RANGES iter_move(_It._Current); } template _Iter2> - friend constexpr void iter_swap(const move_iterator& _Left, const move_iterator<_Iter2>& _Right) noexcept( - noexcept(_RANGES iter_swap(_Left._Current, _Right.base()))) { + friend constexpr void iter_swap(const move_iterator& _Left, const move_iterator<_Iter2>& _Right) +#ifdef __EDG__ // TRANSITION, VSO-1132105 + noexcept(noexcept(_RANGES iter_swap(_STD declval(), _STD declval()))) +#else // ^^^ workaround / no workaround vvv + noexcept(noexcept(_RANGES iter_swap(_Left._Current, _Right.base()))) +#endif // TRANSITION, VSO-1132105 + { _RANGES iter_swap(_Left._Current, _Right.base()); } #endif // __cpp_lib_concepts diff --git a/tests/std/tests/P0088R3_variant/test.cpp b/tests/std/tests/P0088R3_variant/test.cpp index 2cf2dd5210d..20c045972e5 100644 --- a/tests/std/tests/P0088R3_variant/test.cpp +++ b/tests/std/tests/P0088R3_variant/test.cpp @@ -6481,6 +6481,7 @@ namespace msvc { namespace derived_variant { void run_test() { +#ifndef __EDG__ // TRANSITION, VSO-1178211 // Extension: std::visit accepts types derived from a specialization of variant. { struct my_variant : std::variant { @@ -6533,6 +6534,7 @@ namespace msvc { } catch (std::bad_variant_access&) { } } +#endif // TRANSITION, VSO-1178211 } } // namespace derived_variant diff --git a/tests/std/tests/P0896R4_ranges_alg_find_end/test.cpp b/tests/std/tests/P0896R4_ranges_alg_find_end/test.cpp index 06dae11031f..81880bacca8 100644 --- a/tests/std/tests/P0896R4_ranges_alg_find_end/test.cpp +++ b/tests/std/tests/P0896R4_ranges_alg_find_end/test.cpp @@ -76,6 +76,7 @@ int main() { smoke_test(); } +#ifndef _PREFAST_ // TRANSITION, GH-1030 struct instantiator { template static void call(Fwd1&& fwd1 = {}, Fwd2&& fwd2 = {}) { @@ -107,3 +108,4 @@ struct instantiator { }; template void test_fwd_fwd(); +#endif // TRANSITION, GH-1030 diff --git a/tests/std/tests/P0896R4_ranges_alg_mismatch/test.cpp b/tests/std/tests/P0896R4_ranges_alg_mismatch/test.cpp index 51a0b864436..2ee68e9a70b 100644 --- a/tests/std/tests/P0896R4_ranges_alg_mismatch/test.cpp +++ b/tests/std/tests/P0896R4_ranges_alg_mismatch/test.cpp @@ -71,12 +71,11 @@ constexpr void smoke_test() { } int main() { -#ifndef _PREFAST_ // TRANSITION, GH-1030 STATIC_ASSERT((smoke_test(), true)); -#endif // TRANSITION, GH-1030 smoke_test(); } +#ifndef _PREFAST_ // TRANSITION, GH-1030 struct instantiator { template static void call(In1&& in1 = {}, In2&& in2 = {}) { @@ -105,3 +104,4 @@ struct instantiator { }; template void test_in_in(); +#endif // TRANSITION, GH-1030