[libcxx-commits] [libcxx] [libc++] P3029R1: Better `mdspan`'s CTAD - `std::extents` (PR #89015)
Xiaoyang Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 16 20:42:54 PDT 2024
================
@@ -455,8 +455,15 @@ template <class _IndexType, size_t _Rank>
using dextents = typename __mdspan_detail::__make_dextents<_IndexType, _Rank>::type;
// Deduction guide for extents
+# if _LIBCPP_STD_VER >= 26
template <class... _IndexTypes>
-extents(_IndexTypes...) -> extents<size_t, size_t(((void)sizeof(_IndexTypes), dynamic_extent))...>;
+ requires(is_convertible_v<_IndexTypes, size_t> && ...)
----------------
xiaoyang-sde wrote:
[mdspan.extents.cons]/12
https://github.com/llvm/llvm-project/pull/89015
More information about the libcxx-commits
mailing list