Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P3355R1 Fix submdspan for C++26 #7491

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 29 additions & 36 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24319,6 +24319,17 @@
let \tcode{offset} be a value of type \tcode{size_t} equal to
\tcode{(*this)(\exposid{first_}<index_type, P>(slices...)...)}.

\pnum
Given a layout mapping type \tcode{M}, a type \tcode{S} is a
\defnadjx{unit-stride}{slice for \tcode{M}}{slice} if
\begin{itemize}
\item \tcode{S} is a specialization of \tcode{strided_slice}
where \tcode{S::stride_type} models \exposconcept{integral-constant-like}
and \tcode{S::stride_type::value} equals \tcode{1},
\item \tcode{S} models \tcode{\exposconcept{index-pair-like}<M::index_type>}, or
\item \tcode{is_convertible_v<S, full_extent_t>} is \tcode{true}.
\end{itemize}

\rSec5[mdspan.sub.map.left]{\tcode{layout_left} specialization of \tcode{submdspan_mapping}}

\indexlibrarymemberexpos{layout_left::mapping}{submdspan-mapping-impl}%
Expand Down Expand Up @@ -24350,8 +24361,7 @@
\tcode{is_convertible_v<$S_k$, full_ext\-ent_t>} is \tcode{true}; and
\item
for $k$ equal to \tcode{SubExtents::rank() - 1},
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
\begin{note}
If the above conditions are true,
Expand All @@ -24366,21 +24376,17 @@
\end{codeblock}
if for a value $u$ for which $u+1$ is
the smallest value $p$ larger than zero
for which $S_p$ models
\tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
the following conditions are met:
\begin{itemize}
\item
$S_0$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_0$, full_extent_t>} is \tcode{true}; and
$S_0$ is a unit-stride slice for \tcode{decltype(*this)}; and
\item
for each $k$ in the range \range{$u$ + 1}{$u$ + SubExtents::rank() - 1},
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
\item
for $k$ equal to \tcode{$u$ + SubExtents::rank() - 1},
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
and where \tcode{S_static} is:
\begin{itemize}
Expand Down Expand Up @@ -24431,8 +24437,7 @@
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
\item
for $k$ equal to \exposid{_rank} - \tcode{SubExtents::rank()},
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
\begin{note}
If the above conditions are true,
Expand All @@ -24447,23 +24452,19 @@
\end{codeblock}
if for a value $u$ for which $\exposid{rank_} - u - 2$ is
the largest value $p$ smaller than \tcode{\exposid{rank_} - 1}
for which $S_p$ models
\tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
the following conditions are met:
\begin{itemize}
\item
for $k$ equal to \tcode{\exposid{rank_} - 1},
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_k$, full_extent_t> }is \tcode{true}; and
$S_k$ is a unit-stride slice for \tcode{decltype(*this)}; and
\item
for each $k$ in the range
\range{\exposid{rank_} - SubExtents::rank() - $u$ + 1}{\exposid{rank_} - $u$ - 1},
\tcode{is_con\-vertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
\item
for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},\newline
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
and where \tcode{S_static} is:
\begin{itemize}
Expand Down Expand Up @@ -24539,8 +24540,7 @@
\item
\tcode{SubExtents::rank() == 1} is \tcode{true} and
\item
$S_0$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_0$ , full_extent_t>} is \tcode{true};
$S_0$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
\item
otherwise,
Expand All @@ -24550,20 +24550,17 @@
\end{codeblock}
if for a value $u$
for which \tcode{$u$ + 1} is the smallest value $p$ larger than zero
for which $S_p$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
the following conditions are met:
\begin{itemize}
\item
$S_0$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_0$, full_extent_t>} is \tcode{true}; and
$S_0$ is a unit-stride slice for \tcode{decltype(*this)}; and
\item
for each $k$ in the range \range{$u$ + 1}{$u$ + SubExtents::rank() - 1},
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
\item
for $k$ equal to \tcode{$u$ + SubExtents::rank() - 1},
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<Sk, full_extent_t>} is \tcode{true};
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
where \tcode{S_static} is:
\begin{itemize}
Expand Down Expand Up @@ -24615,8 +24612,7 @@
\tcode{SubExtents::rank() == 1} is \tcode{true} and
\item
for $k$ equal to \tcode{\exposid{rank_} - 1},
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_k$ , full_extent_t>} is \tcode{true};
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
\item
otherwise,
Expand All @@ -24627,22 +24623,19 @@
if for a value $u$
for which \tcode{\exposid{rank_} - $u$ - 2}
is the largest value p smaller than \tcode{\exposid{rank_} - 1}
for which $S_p$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
the following conditions are met:
\begin{itemize}
\item
for $k$ equal to \tcode{\exposid{rank_} - 1},
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
$S_k$ is a unit-stride slice for \tcode{decltype(*this)}; and
\item
for each $k$ in the range
\range{\exposid{rank_} - SubExtents::rank() - $u$ + 1}{\exposid{rank_} - $u$ - 1)},
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
\item
for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},
$S_k$ models \tcode{\exposconcept{index-pair-like}<index_type>} or
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},\newline
$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
and where \tcode{S_static} is:
\begin{itemize}
Expand Down
2 changes: 1 addition & 1 deletion source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@
#define @\defnlibxname{cpp_lib_string_resize_and_overwrite}@ 202110L // also in \libheader{string}
#define @\defnlibxname{cpp_lib_string_udls}@ 201304L // also in \libheader{string}
#define @\defnlibxname{cpp_lib_string_view}@ 202403L // also in \libheader{string}, \libheader{string_view}
#define @\defnlibxname{cpp_lib_submdspan}@ 202403L // freestanding, also in \libheader{mdspan}
#define @\defnlibxname{cpp_lib_submdspan}@ 202411L // freestanding, also in \libheader{mdspan}
#define @\defnlibxname{cpp_lib_syncbuf}@ 201803L // also in \libheader{syncstream}
#define @\defnlibxname{cpp_lib_text_encoding}@ 202306L // also in \libheader{text_encoding}
#define @\defnlibxname{cpp_lib_three_way_comparison}@ 201907L // freestanding, also in \libheader{compare}
Expand Down
Loading