Skip to content

Commit 85d64aa

Browse files
committed
Tighten the words we use in "Throughout this [sub]clause" wording
to introduce a set of requirements for template arguments based on their names, and make these paragraphs consistent.
1 parent 50dfba2 commit 85d64aa

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed

source/algorithms.tex

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -582,41 +582,48 @@
582582
\pnum
583583
Throughout this Clause, the names of template parameters
584584
are used to express type requirements.
585-
If an algorithm's template parameter is
585+
\begin{itemize}
586+
\item
587+
If an algorithm's template parameter is named
586588
\tcode{InputIterator},
587589
\tcode{InputIterator1},
588590
or
589591
\tcode{InputIterator2},
590-
the actual template argument shall satisfy the
592+
the template argument shall satisfy the
591593
requirements of an input iterator~(\ref{input.iterators}).
592-
If an algorithm's template parameter is
594+
\item
595+
If an algorithm's template parameter is named
593596
\tcode{OutputIterator},
594597
\tcode{OutputIterator1},
595598
or
596599
\tcode{OutputIterator2},
597-
the actual template argument shall satisfy the requirements
600+
the template argument shall satisfy the requirements
598601
of an output iterator~(\ref{output.iterators}).
599-
If an algorithm's template parameter is
602+
\item
603+
If an algorithm's template parameter is named
600604
\tcode{ForwardIterator},
601605
\tcode{ForwardIterator1},
602606
or
603607
\tcode{ForwardIterator2},
604-
the actual template argument shall satisfy the requirements
608+
the template argument shall satisfy the requirements
605609
of a forward iterator~(\ref{forward.iterators}).
606-
If an algorithm's template parameter is
610+
\item
611+
If an algorithm's template parameter is named
607612
\tcode{BidirectionalIterator},
608613
\tcode{Bidirectional\-Iterator1},
609614
or
610615
\tcode{BidirectionalIterator2},
611-
the actual template argument shall satisfy the requirements
616+
the template argument shall satisfy the requirements
612617
of a bidirectional iterator~(\ref{bidirectional.iterators}).
613-
If an algorithm's template parameter is
618+
\item
619+
If an algorithm's template parameter is named
614620
\tcode{RandomAccessIterator},
615621
\tcode{Random\-AccessIterator1},
616622
or
617623
\tcode{RandomAccessIterator2},
618-
the actual template argument shall satisfy the requirements
624+
the template argument shall satisfy the requirements
619625
of a random-access iterator~(\ref{random.access.iterators}).
626+
\end{itemize}
620627

621628
\pnum
622629
If an algorithm's
@@ -627,7 +634,7 @@
627634
The type of that argument shall satisfy the requirements
628635
of a mutable iterator~(\ref{iterator.requirements}).
629636
\enternote
630-
This requirement does not affect arguments that are declared as
637+
This requirement does not affect arguments that are named
631638
\tcode{OutputIterator},
632639
\tcode{OutputIterator1},
633640
or

source/threads.tex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@
2525
\pnum
2626
Throughout this Clause, the names of template parameters are used to express type
2727
requirements.
28-
29-
\pnum
30-
If a parameter is \tcode{Predicate}, \tcode{operator()} applied to the actual template
31-
argument shall return a value that is convertible to \tcode{bool}.
28+
If a template parameter is named \tcode{Predicate}, \tcode{operator()} applied to
29+
the template argument shall return a value that is convertible to \tcode{bool}.
3230

3331
\rSec2[thread.req.exception]{Exceptions}
3432

source/utilities.tex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10269,9 +10269,10 @@
1026910269
\tcode{intmax_t}.
1027010270

1027110271
\pnum
10272-
Throughout this subclause, if the template argument types \tcode{R1} and
10273-
\tcode{R2} are not specializations of the \tcode{ratio} template, the program is
10274-
ill-formed.
10272+
Throughout this subclause, the names of template parameters are used to express
10273+
type requirements. If a template parameter is named \tcode{R1} or \tcode{R2},
10274+
and the template argument is not a specialization of the \tcode{ratio} template,
10275+
the program is ill-formed.
1027510276

1027610277
\rSec2[ratio.syn]{Header \tcode{<ratio>} synopsis}
1027710278

0 commit comments

Comments
 (0)