[libcxx-commits] [libcxx] [libc++] P3029R1: Better `mdspan`'s CTAD (PR #87873)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 7 03:40:47 PDT 2024
================
@@ -370,7 +370,11 @@ namespace std {
template<class ElementType, class... Integrals>
requires((is_convertible_v<Integrals, size_t> && ...) && sizeof...(Integrals) > 0)
explicit mdspan(ElementType*, Integrals...)
- -> mdspan<ElementType, dextents<size_t, sizeof...(Integrals)>>;
+ -> mdspan<ElementType, dextents<size_t, sizeof...(Integrals)>>; // until C++26
+ template<class ElementType, class... Integrals>
+ requires((is_convertible_v<Integrals, size_t> && ...) && sizeof...(Integrals) > 0)
+ explicit mdspan(ElementType*, Integrals...)
+ -> mdspan<ElementType, dextents<size_t, maybe-static-ext<Integrals>...>>; // since C++26
----------------
mordante wrote:
```suggestion
-> mdspan<ElementType, extents<size_t, maybe-static-ext<Integrals>...>>; // since C++26
```
https://github.com/llvm/llvm-project/pull/87873
More information about the libcxx-commits
mailing list