From 09b3018a2a17b92b4e4040c24bc56b73a5489cb6 Mon Sep 17 00:00:00 2001 From: Jakub Mazurkiewicz Date: Wed, 5 Apr 2023 00:03:05 +0200 Subject: [PATCH 1/2] Fix `extents` deduction guide --- stl/inc/mdspan | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/stl/inc/mdspan b/stl/inc/mdspan index 9594bf14ce..5506590b7c 100644 --- a/stl/inc/mdspan +++ b/stl/inc/mdspan @@ -267,16 +267,12 @@ public: } }; -#if defined(__clang__) || defined(__EDG__) // TRANSITION, REQUIRES REPORT (ICE) -template - requires (is_convertible_v<_Integrals, size_t> && ...) -extents(_Integrals... _Exts) -> extents; -#else // ^^^ no workaround / workaround vvv +template +inline constexpr size_t _Repeat_dynamic_extent = dynamic_extent; + template requires (is_convertible_v<_Integrals, size_t> && ...) -extents(_Integrals...) - -> extents, _Integrals>::value...>; -#endif // ^^^ workaround ^^^ +extents(_Integrals...) -> extents...>; template struct _Dextents_impl; From d8dd87ebaa4feb7d070918ee9e55037933a8e517 Mon Sep 17 00:00:00 2001 From: Jakub Mazurkiewicz Date: Fri, 7 Apr 2023 00:08:21 +0200 Subject: [PATCH 2/2] Drive-by: alias repeating `layout_right::mapping` Comment: https://github.com/microsoft/STL/pull/3615#discussion_r1156571002 --- tests/std/tests/P0009R18_mdspan_layout_right/test.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/std/tests/P0009R18_mdspan_layout_right/test.cpp b/tests/std/tests/P0009R18_mdspan_layout_right/test.cpp index 620183f2ac..4810d8a362 100644 --- a/tests/std/tests/P0009R18_mdspan_layout_right/test.cpp +++ b/tests/std/tests/P0009R18_mdspan_layout_right/test.cpp @@ -183,12 +183,10 @@ constexpr void check_construction_from_other_left_mapping() { } { // Check implicit conversions - static_assert(!NotImplicitlyConstructibleFrom>, - layout_left::mapping>>); - static_assert(NotImplicitlyConstructibleFrom>, - layout_left::mapping>>); - static_assert(NotImplicitlyConstructibleFrom>, - layout_left::mapping>>); + using Mapping = layout_right::mapping>; + static_assert(!NotImplicitlyConstructibleFrom>>); + static_assert(NotImplicitlyConstructibleFrom>>); + static_assert(NotImplicitlyConstructibleFrom>>); } }