Skip to content

Commit 69ce701

Browse files
tkoeppezygoloid
authored andcommitted
[views.span] Editorial review fixes:
* [span.sub] Refactor the specification of subspan() slightly to define the return type precisely. Note that when Extent is not dynamic, then Extent and size() are the same, so we can say "size()" in both cases unconditionally. * Introduce new heading "Overview [span.overview]" to remove hanging paragraphs in [views.span]. * Rephrase "Extent < dynamic_extent" to "Extent is negative and not equal to dynamic_extent" to avoid unnecessary dependency on details of dynamic_extent.
1 parent c25096e commit 69ce701

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

source/containers.tex

+15-9
Original file line numberDiff line numberDiff line change
@@ -9916,6 +9916,8 @@
99169916

99179917
\rSec2[views.span]{Class template \tcode{span}}
99189918

9919+
\rSec3[span.overview]{Overview}
9920+
99199921
\pnum
99209922
\indexlibrary{\idxcode{span}}%
99219923
A \tcode{span} is a view over a contiguous sequence of objects,
@@ -9925,7 +9927,8 @@
99259927
\tcode{ElementType} is required to be a complete object type that is not an abstract class type.
99269928

99279929
\pnum
9928-
If \tcode{Extent < dynamic_extent}, the program is ill-formed.
9930+
If \tcode{Extent} is negative and not equal to \tcode{dynamic_extent},
9931+
the program is ill-formed.
99299932

99309933
\pnum
99319934
The iterator type for span is a random access iterator and a contiguous iterator.
@@ -10246,14 +10249,17 @@
1024610249
\effects
1024710250
Equivalent to:
1024810251
\begin{codeblock}
10249-
return span<ElementType,
10250-
Count != dynamic_extent
10251-
? Count
10252-
: (Extent != dynamic_extent ? Extent - Offset : dynamic_extent)>(
10253-
data() + Offset,
10254-
Count != dynamic_extent
10255-
? Count
10256-
: (Extent != dynamic_extent ? Extent - Offset : size() - Offset));
10252+
return span<ElementType, @\seebelow@>(
10253+
data() + Offset, Count != dynamic_extent ? Count : size() - Offset);
10254+
\end{codeblock}
10255+
10256+
\pnum
10257+
\remarks
10258+
The second template argument of the returned \tcode{span} type is:
10259+
\begin{codeblock}
10260+
Count != dynamic_extent ? Count
10261+
: (Extent != dynamic_extent ? Extent - Offset
10262+
: dynamic_extent)
1025710263
\end{codeblock}
1025810264
\end{itemdescr}
1025910265

0 commit comments

Comments
 (0)