Skip to content

Commit 4a657ca

Browse files
committed
[iterator.concept.sizedsentinel], [range.sized], [range.view]
Provide proper descriptions for disable_sized_sentinel, disable_sized_range, and enable_view.
1 parent b969599 commit 4a657ca

File tree

2 files changed

+33
-9
lines changed

2 files changed

+33
-9
lines changed

source/iterators.tex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,15 @@
14561456
\end{itemize}
14571457
\end{itemdescr}
14581458

1459+
\indexlibrary{\idxcode{disable_sized_sentinel}}%
1460+
\begin{itemdecl}
1461+
template<class S, class I>
1462+
inline constexpr bool disable_sized_sentinel = false;
1463+
\end{itemdecl}
1464+
1465+
\begin{itemdescr}
14591466
\pnum
1467+
\remarks
14601468
Pursuant to \ref{namespace.std},
14611469
users may specialize \tcode{disable_sized_sentinel}
14621470
for cv-unqualified non-array object types \tcode{S} and \tcode{I}
@@ -1477,6 +1485,7 @@
14771485
\libconcept{RandomAccessIterator}s\iref{iterator.concept.random.access} and by
14781486
counted iterators and their sentinels\iref{counted.iterator}.
14791487
\end{example}
1488+
\end{itemdescr}
14801489

14811490
\rSec3[iterator.concept.input]{Concept \tcode{InputIterator}}
14821491

source/ranges.tex

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,17 @@
811811
is non-amortized, unlike the case for the complexity of the evaluations of
812812
\tcode{ranges::begin} and \tcode{ranges::end} in the \tcode{Range} concept.
813813
\end{note}
814+
\end{itemdescr}
815+
816+
\indexlibrary{\idxcode{disable_sized_range}}%
817+
\begin{itemdecl}
818+
template<class>
819+
inline constexpr bool disable_sized_range = false;
820+
\end{itemdecl}
814821

822+
\begin{itemdescr}
815823
\pnum
824+
\remarks
816825
Pursuant to \ref{namespace.std},
817826
users may specialize \tcode{disable_sized_range}
818827
for cv-unqualified non-array object types.
@@ -829,6 +838,15 @@
829838

830839
\rSec2[range.view]{Views}
831840

841+
\indexlibrary{\idxcode{View}}%
842+
\begin{itemdecl}
843+
template<class T>
844+
concept View =
845+
Range<T> && Semiregular<T> && enable_view<T>;
846+
\end{itemdecl}
847+
848+
\begin{itemdescr}
849+
% FIXME: This should explicitly say when View is modeled.
832850
\pnum
833851
The \tcode{View} concept specifies the requirements of a \libconcept{Range} type
834852
that has constant time copy, move, and assignment operators; that is, the cost of
@@ -852,24 +870,21 @@
852870
copying the container copies the elements,
853871
which cannot be done in constant time.
854872
\end{example}
873+
\end{itemdescr}
874+
875+
\pnum
876+
Since the difference between \libconcept{Range} and \libconcept{View} is largely
877+
semantic, the two are differentiated with the help of \tcode{enable_view}.
855878

856879
\indexlibrary{\idxcode{enable_view}}%
857-
\indexlibrary{\idxcode{View}}%
858880
\begin{itemdecl}
859881
template<class T>
860882
inline constexpr bool enable_view = @\seebelow@;
861-
862-
template<class T>
863-
concept View =
864-
Range<T> && Semiregular<T> && enable_view<T>;
865883
\end{itemdecl}
866884

867885
\begin{itemdescr}
868886
\pnum
869-
Since the difference between \libconcept{Range} and \libconcept{View} is largely
870-
semantic, the two are differentiated with the help of \tcode{enable_view}.
871-
872-
\pnum
887+
\remarks
873888
For a type \tcode{T}, the default value of \tcode{enable_view<T>} is:
874889
\begin{itemize}
875890

0 commit comments

Comments
 (0)