Skip to content

Commit 9175fe2

Browse files
committed
P3355R1 Fix submdspan for C++26
1 parent 1dabdd3 commit 9175fe2

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

source/containers.tex

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24319,6 +24319,17 @@
2431924319
let \tcode{offset} be a value of type \tcode{size_t} equal to
2432024320
\tcode{(*this)(\exposid{first_}<index_type, P>(slices...)...)}.
2432124321

24322+
\pnum
24323+
Given a layout mapping type \tcode{M}, a type \tcode{S} is a
24324+
\defnadjx{unit-stride}{slice for \tcode{M}}{slice} if
24325+
\begin{itemize}
24326+
\item \tcode{S} is a specialization of \tcode{strided_slice}
24327+
where \tcode{S::stride_type} models \exposconcept{integral-constant-like}
24328+
and \tcode{S::stride_type::value} equals \tcode{1},
24329+
\item \tcode{S} models \tcode{\exposconcept{index-pair-like}<M::index_type>}, or
24330+
\item \tcode{is_convertible_v<S, full_extent_t>} is \tcode{true}.
24331+
\end{itemize}
24332+
2432224333
\rSec5[mdspan.sub.map.left]{\tcode{layout_left} specialization of \tcode{submdspan_mapping}}
2432324334

2432424335
\indexlibrarymemberexpos{layout_left::mapping}{submdspan-mapping-impl}%
@@ -24350,8 +24361,7 @@
2435024361
\tcode{is_convertible_v<$S_k$, full_ext\-ent_t>} is \tcode{true}; and
2435124362
\item
2435224363
for $k$ equal to \tcode{SubExtents::rank() - 1},
24353-
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24354-
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
24364+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2435524365
\end{itemize}
2435624366
\begin{note}
2435724367
If the above conditions are true,
@@ -24379,8 +24389,7 @@
2437924389
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
2438024390
\item
2438124391
for $k$ equal to \tcode{$u$ + SubExtents::rank() - 1},
24382-
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24383-
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
24392+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2438424393
\end{itemize}
2438524394
and where \tcode{S_static} is:
2438624395
\begin{itemize}
@@ -24431,8 +24440,7 @@
2443124440
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
2443224441
\item
2443324442
for $k$ equal to \exposid{_rank} - \tcode{SubExtents::rank()},
24434-
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24435-
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
24443+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2443624444
\end{itemize}
2443724445
\begin{note}
2443824446
If the above conditions are true,
@@ -24454,16 +24462,14 @@
2445424462
\begin{itemize}
2445524463
\item
2445624464
for $k$ equal to \tcode{\exposid{rank_} - 1},
24457-
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24458-
\tcode{is_convertible_v<$S_k$, full_extent_t> }is \tcode{true}; and
24465+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)}; and
2445924466
\item
2446024467
for each $k$ in the range
2446124468
\range{\exposid{rank_} - SubExtents::rank() - $u$ + 1}{\exposid{rank_} - $u$ - 1},
2446224469
\tcode{is_con\-vertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
2446324470
\item
2446424471
for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},
24465-
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24466-
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
24472+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2446724473
\end{itemize}
2446824474
and where \tcode{S_static} is:
2446924475
\begin{itemize}
@@ -24562,8 +24568,7 @@
2456224568
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
2456324569
\item
2456424570
for $k$ equal to \tcode{$u$ + SubExtents::rank() - 1},
24565-
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24566-
\tcode{is_convertible_v<Sk, full_extent_t>} is \tcode{true};
24571+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2456724572
\end{itemize}
2456824573
where \tcode{S_static} is:
2456924574
\begin{itemize}
@@ -24615,8 +24620,7 @@
2461524620
\tcode{SubExtents::rank() == 1} is \tcode{true} and
2461624621
\item
2461724622
for $k$ equal to \tcode{\exposid{rank_} - 1},
24618-
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24619-
\tcode{is_convertible_v<$S_k$ , full_extent_t>} is \tcode{true};
24623+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2462024624
\end{itemize}
2462124625
\item
2462224626
otherwise,
@@ -24633,16 +24637,14 @@
2463324637
\begin{itemize}
2463424638
\item
2463524639
for $k$ equal to \tcode{\exposid{rank_} - 1},
24636-
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24637-
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
24640+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)}; and
2463824641
\item
2463924642
for each $k$ in the range
2464024643
\range{\exposid{rank_} - SubExtents::rank() - $u$ + 1}{\exposid{rank_} - $u$ - 1)},
2464124644
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
2464224645
\item
2464324646
for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},
24644-
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24645-
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
24647+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2464624648
\end{itemize}
2464724649
and where \tcode{S_static} is:
2464824650
\begin{itemize}

source/support.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@
797797
#define @\defnlibxname{cpp_lib_string_resize_and_overwrite}@ 202110L // also in \libheader{string}
798798
#define @\defnlibxname{cpp_lib_string_udls}@ 201304L // also in \libheader{string}
799799
#define @\defnlibxname{cpp_lib_string_view}@ 202403L // also in \libheader{string}, \libheader{string_view}
800-
#define @\defnlibxname{cpp_lib_submdspan}@ 202403L // freestanding, also in \libheader{mdspan}
800+
#define @\defnlibxname{cpp_lib_submdspan}@ 202411L // freestanding, also in \libheader{mdspan}
801801
#define @\defnlibxname{cpp_lib_syncbuf}@ 201803L // also in \libheader{syncstream}
802802
#define @\defnlibxname{cpp_lib_text_encoding}@ 202306L // also in \libheader{text_encoding}
803803
#define @\defnlibxname{cpp_lib_three_way_comparison}@ 201907L // freestanding, also in \libheader{compare}

0 commit comments

Comments
 (0)