Skip to content

Commit 75b8299

Browse files
committed
[const.iterators] Add subclause structure.
1 parent 0efe0f5 commit 75b8299

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

source/iterators.tex

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,17 @@
335335
inserter(Container& x, ranges::iterator_t<Container> i); // freestanding
336336

337337
// \ref{const.iterators}, constant iterators and sentinels
338+
// \ref{const.iterators.alias}, alias templates
338339
template<@\libconcept{indirectly_readable}@ I>
339340
using iter_const_reference_t = @\seebelow@; // freestanding
340341
template<class Iterator>
341342
concept @\exposconcept{constant-iterator}@ = @\seebelow@; // \expos
343+
template<@\libconcept{input_iterator}@ I>
344+
using const_iterator = @\seebelow@; // freestanding
345+
template<class S>
346+
using const_sentinel = @\seebelow@; // freestanding
342347

348+
// \ref{const.iterators.iterator}, class template \tcode{basic_const_iterator}
343349
template<class Iterator>
344350
class basic_const_iterator; // freestanding
345351

@@ -356,12 +362,6 @@
356362
using type = basic_const_iterator<common_type_t<T, U>>;
357363
};
358364

359-
template<@\libconcept{input_iterator}@ I>
360-
using const_iterator = @\seebelow@; // freestanding
361-
362-
template<class S>
363-
using const_sentinel = @\seebelow@; // freestanding
364-
365365
template<@\libconcept{input_iterator}@ I>
366366
constexpr const_iterator<I> make_const_iterator(I it) { return it; } // freestanding
367367

@@ -4157,6 +4157,8 @@
41574157

41584158
\rSec2[const.iterators]{Constant iterators and sentinels}
41594159

4160+
\rSec3[const.iterators.general]{General}
4161+
41604162
\pnum
41614163
Class template \tcode{basic_const_iterator} is an iterator adaptor
41624164
with the same behavior as the underlying iterator
@@ -4169,6 +4171,8 @@
41694171
\pnum
41704172
Specializations of \tcode{basic_const_iterator} are constant iterators.
41714173

4174+
\rSec3[const.iterators.alias]{Alias templates}
4175+
41724176
\begin{itemdecl}
41734177
template<@\libconcept{indirectly_readable}@ It>
41744178
using iter_const_reference_t = common_reference_t<const iter_value_t<It>&&,
@@ -4201,11 +4205,13 @@
42014205
Otherwise, \tcode{S}.
42024206
\end{itemdescr}
42034207

4204-
\begin{codeblock}
4205-
template<class I>
4206-
concept @\exposconcept{not-a-const-iterator}@ = @\seebelow@;
4208+
\rSec3[const.iterators.iterator]{Class template \tcode{basic_const_iterator}}
42074209

4210+
\begin{codeblock}
42084211
namespace std {
4212+
template<class I>
4213+
concept @\exposconcept{not-a-const-iterator}@ = @\seebelow@;
4214+
42094215
template<@\libconcept{input_iterator}@ Iterator>
42104216
class @\libglobal{basic_const_iterator}@ {
42114217
Iterator @\exposid{current_}@ = Iterator();
@@ -4318,6 +4324,8 @@
43184324
if \tcode{I} is a specialization of \tcode{basic_const_iterator} and
43194325
\tcode{true} otherwise.
43204326

4327+
\rSec3[const.iterators.types]{Member types}
4328+
43214329
\pnum
43224330
\tcode{basic_const_iterator<Iterator>::iterator_concept} is defined as follows:
43234331
\begin{itemize}
@@ -4344,6 +4352,8 @@
43444352
\tcode{basic_const_iterator<Iterator>::iterator_category} denotes
43454353
the type \tcode{iterator_traits<\brk{}Iterator>::iterator_category}.
43464354

4355+
\rSec3[const.iterators.ops]{Operations}
4356+
43474357
\indexlibraryctor{basic_const_iterator}%
43484358
\begin{itemdecl}
43494359
constexpr basic_const_iterator(Iterator current);

0 commit comments

Comments
 (0)