From a0539e48f44c1663bc59c24c8e827409be5b39ea Mon Sep 17 00:00:00 2001 From: Jakub Mazurkiewicz Date: Thu, 11 May 2023 12:37:19 +0200 Subject: [PATCH] Document DevCom-10360833 workaround --- stl/inc/mdspan | 4 ++-- tests/std/tests/P0009R18_mdspan_layout_stride/test.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/stl/inc/mdspan b/stl/inc/mdspan index 0c188a582a6..0d2fa374adc 100644 --- a/stl/inc/mdspan +++ b/stl/inc/mdspan @@ -616,7 +616,7 @@ public: } } -#ifndef __clang__ // TRANSITION, MSVC messes up CTAD when concepts are used here (needs further investigation) +#ifndef __clang__ // TRANSITION, DevCom-10360833 template && is_nothrow_constructible_v, int> = 0> @@ -629,7 +629,7 @@ public: : mapping(_Exts_, _Strides_, make_index_sequence{}) { } -#ifndef __clang__ // TRANSITION, MSVC messes up CTAD when concepts are used here (needs further investigation) +#ifndef __clang__ // TRANSITION, DevCom-10360833 template && is_nothrow_constructible_v, int> = 0> diff --git a/tests/std/tests/P0009R18_mdspan_layout_stride/test.cpp b/tests/std/tests/P0009R18_mdspan_layout_stride/test.cpp index 4f98daa7b9c..e18d9186566 100644 --- a/tests/std/tests/P0009R18_mdspan_layout_stride/test.cpp +++ b/tests/std/tests/P0009R18_mdspan_layout_stride/test.cpp @@ -164,6 +164,14 @@ constexpr void check_members(extents ext, const array(ext, strides); } +constexpr void check_ctad() { + extents e; + array s{1, 2}; + layout_stride::mapping m{e, s}; + assert(m.extents() == e); + assert(m.strides() == s); +} + constexpr bool test() { // Check signed integers check_members(extents{5}, array{1}); @@ -179,6 +187,8 @@ constexpr bool test() { check_members(extents{}, array{1}); check_members(extents{3}, array{1, 3, 6}); + check_ctad(); + // TRANSITION more tests return true; }