[libcxx-commits] [libcxx] [libc++] P3029R1: Better `mdspan`'s CTAD - `std::extents` (PR #89015)
Xiaoyang Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 17 08:51:05 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:
Yes, this line is a drive-by change that applies to both C++23 and C++26.
https://github.com/llvm/llvm-project/pull/89015
More information about the libcxx-commits
mailing list