Skip to content

Commit bd27b0f

Browse files
committed
P3355R1 Fix submdspan for C++26
Editorial notes: * The editing instructions in the paper do not quite match the actual edits that we performed, but this appears to be a deficiency of the instructions rather than due to unclear intentions.
1 parent 1dabdd3 commit bd27b0f

File tree

2 files changed

+30
-37
lines changed

2 files changed

+30
-37
lines changed

source/containers.tex

Lines changed: 29 additions & 36 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,
@@ -24366,21 +24376,17 @@
2436624376
\end{codeblock}
2436724377
if for a value $u$ for which $u+1$ is
2436824378
the smallest value $p$ larger than zero
24369-
for which $S_p$ models
24370-
\tcode{\exposconcept{index-pair-like}<index_type>} or
24371-
\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
24379+
for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
2437224380
the following conditions are met:
2437324381
\begin{itemize}
2437424382
\item
24375-
$S_0$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24376-
\tcode{is_convertible_v<$S_0$, full_extent_t>} is \tcode{true}; and
24383+
$S_0$ is a unit-stride slice for \tcode{decltype(*this)}; and
2437724384
\item
2437824385
for each $k$ in the range \range{$u$ + 1}{$u$ + SubExtents::rank() - 1},
2437924386
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
2438024387
\item
2438124388
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};
24389+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2438424390
\end{itemize}
2438524391
and where \tcode{S_static} is:
2438624392
\begin{itemize}
@@ -24431,8 +24437,7 @@
2443124437
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
2443224438
\item
2443324439
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};
24440+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2443624441
\end{itemize}
2443724442
\begin{note}
2443824443
If the above conditions are true,
@@ -24447,23 +24452,19 @@
2444724452
\end{codeblock}
2444824453
if for a value $u$ for which $\exposid{rank_} - u - 2$ is
2444924454
the largest value $p$ smaller than \tcode{\exposid{rank_} - 1}
24450-
for which $S_p$ models
24451-
\tcode{\exposconcept{index-pair-like}<index_type>} or
24452-
\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
24455+
for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
2445324456
the following conditions are met:
2445424457
\begin{itemize}
2445524458
\item
2445624459
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
24460+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)}; and
2445924461
\item
2446024462
for each $k$ in the range
2446124463
\range{\exposid{rank_} - SubExtents::rank() - $u$ + 1}{\exposid{rank_} - $u$ - 1},
2446224464
\tcode{is_con\-vertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
2446324465
\item
24464-
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};
24466+
for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},\newline
24467+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2446724468
\end{itemize}
2446824469
and where \tcode{S_static} is:
2446924470
\begin{itemize}
@@ -24539,8 +24540,7 @@
2453924540
\item
2454024541
\tcode{SubExtents::rank() == 1} is \tcode{true} and
2454124542
\item
24542-
$S_0$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24543-
\tcode{is_convertible_v<$S_0$ , full_extent_t>} is \tcode{true};
24543+
$S_0$ is a unit-stride slice for \tcode{decltype(*this)};
2454424544
\end{itemize}
2454524545
\item
2454624546
otherwise,
@@ -24550,20 +24550,17 @@
2455024550
\end{codeblock}
2455124551
if for a value $u$
2455224552
for which \tcode{$u$ + 1} is the smallest value $p$ larger than zero
24553-
for which $S_p$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24554-
\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
24553+
for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
2455524554
the following conditions are met:
2455624555
\begin{itemize}
2455724556
\item
24558-
$S_0$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24559-
\tcode{is_convertible_v<$S_0$, full_extent_t>} is \tcode{true}; and
24557+
$S_0$ is a unit-stride slice for \tcode{decltype(*this)}; and
2456024558
\item
2456124559
for each $k$ in the range \range{$u$ + 1}{$u$ + SubExtents::rank() - 1},
2456224560
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
2456324561
\item
2456424562
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};
24563+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2456724564
\end{itemize}
2456824565
where \tcode{S_static} is:
2456924566
\begin{itemize}
@@ -24615,8 +24612,7 @@
2461524612
\tcode{SubExtents::rank() == 1} is \tcode{true} and
2461624613
\item
2461724614
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};
24615+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2462024616
\end{itemize}
2462124617
\item
2462224618
otherwise,
@@ -24627,22 +24623,19 @@
2462724623
if for a value $u$
2462824624
for which \tcode{\exposid{rank_} - $u$ - 2}
2462924625
is the largest value p smaller than \tcode{\exposid{rank_} - 1}
24630-
for which $S_p$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
24631-
\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
24626+
for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
2463224627
the following conditions are met:
2463324628
\begin{itemize}
2463424629
\item
2463524630
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
24631+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)}; and
2463824632
\item
2463924633
for each $k$ in the range
2464024634
\range{\exposid{rank_} - SubExtents::rank() - $u$ + 1}{\exposid{rank_} - $u$ - 1)},
2464124635
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
2464224636
\item
24643-
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};
24637+
for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},\newline
24638+
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
2464624639
\end{itemize}
2464724640
and where \tcode{S_static} is:
2464824641
\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)