Skip to content

Commit 1a9b8eb

Browse files
committed
Convert "must"s in normative wording that do not indicate logical
necessity to a different form. Normative requirements use "shall". Advice to users uses "should". Description of the behavior of the implementation that does not of itself constitute a requirement uses the imperative mood. Fixes ISO 21 (C++17 DIS)
1 parent 6218c21 commit 1a9b8eb

File tree

7 files changed

+43
-37
lines changed

7 files changed

+43
-37
lines changed

source/iostreams.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,7 @@
19191919
\begin{itemdescr}
19201920
\pnum
19211921
\requires
1922-
If \tcode{tiestr} is not null, \tcode{tiestr} must not be reachable by
1922+
If \tcode{tiestr} is not null, \tcode{tiestr} shall not be reachable by
19231923
traversing the linked list of tied stream objects starting from
19241924
\tcode{tiestr->tie()}.
19251925

@@ -13781,7 +13781,7 @@
1378113781

1378213782
\begin{itemdescr}
1378313783
\pnum
13784-
\effects Converts \tcode{p}, which must exist, to an absolute
13784+
\effects Converts \tcode{p} to an absolute
1378513785
path that has no symbolic link, \grammarterm{dot}, or \grammarterm{dot-dot} elements
1378613786
in its pathname in the generic format.
1378713787

source/lib-intro.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335

336336
\definition{reserved function}{defns.reserved.function}
337337
\indexdefn{function!reserved}%
338-
function, specified as part of the \Cpp standard library, that must be defined by the
338+
function, specified as part of the \Cpp standard library, that is defined by the
339339
implementation
340340

341341
\begin{defnote}

source/locales.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@
10751075
\tcode{put()}
10761076
members make no provision for error reporting.
10771077
(Any failures of the
1078-
OutputIterator argument must be extracted from the returned iterator.)
1078+
OutputIterator argument can be extracted from the returned iterator.)
10791079
The
10801080
\tcode{get()}
10811081
members take an
@@ -3926,7 +3926,7 @@
39263926
\remarks It is unspecified whether multiple calls to
39273927
\tcode{do_get()} with the
39283928
address of the same \tcode{struct tm} object will update the current contents of
3929-
the object or simply overwrite its members. Portable programs must zero
3929+
the object or simply overwrite its members. Portable programs should zero
39303930
out the object before invoking the function.
39313931

39323932
\pnum

source/numerics.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7049,7 +7049,7 @@
70497049
template object which has reference semantics to the original array, working in
70507050
conjunction with various overloads of \tcode{operator=} and other assigning
70517051
operators to allow selective replacement (slicing) of the controlled sequence.
7052-
In each case the selected element(s) must exist.
7052+
In each case the selected element(s) shall exist.
70537053

70547054
\indexlibrarymember{operator[]}{valarray}%
70557055
\begin{itemdecl}

source/templates.tex

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4687,7 +4687,8 @@
46874687
as the template parameter) can be used in place of that
46884688
template parameter in a reference to the current
46894689
instantiation. In the case of a non-type template argument,
4690-
the argument must have been given the value of the
4690+
this only applies if
4691+
the argument was given the value of the
46914692
template parameter and not an expression in which the
46924693
template parameter appears as a subexpression.
46934694
\begin{example}
@@ -6867,23 +6868,26 @@
68676868
\end{example}
68686869

68696870
\pnum
6870-
When an explicit template argument list is specified, the template
6871-
arguments must be compatible with the template parameter list and must
6872-
result in a valid function type as described below; otherwise type
6871+
When an explicit template argument list is specified, if the template
6872+
arguments are not compatible with the template parameter list or do
6873+
not result in a valid function type as described below, type
68736874
deduction fails. Specifically, the following steps are performed when
68746875
evaluating an explicitly specified template argument list with respect
68756876
to a given function template:
68766877
\begin{itemize}
6877-
\item The specified template arguments must match the template parameters in
6878-
kind (i.e., type, non-type, template). There
6879-
must not be more arguments than there are parameters
6880-
unless at least one parameter is a template parameter pack, and there shall be
6881-
an argument for each non-pack parameter.
6882-
Otherwise, type deduction fails.
6883-
6884-
\item Non-type arguments must match the types of the corresponding non-type
6885-
template parameters, or must be convertible to the types of the
6886-
corresponding non-type parameters as specified in~\ref{temp.arg.nontype}, otherwise type deduction fails.
6878+
\item If the specified template arguments do not match the template
6879+
parameters in
6880+
kind (i.e., type, non-type, template), or if there
6881+
are more arguments than there are parameters
6882+
and no parameter is a template parameter pack, or if there is not
6883+
an argument for each non-pack parameter,
6884+
type deduction fails.
6885+
6886+
\item If any non-type argument does not match the type of the
6887+
corresponding non-type
6888+
template parameter, and is not convertible to the type of the
6889+
corresponding non-type parameter as specified in~\ref{temp.arg.nontype},
6890+
type deduction fails.
68876891

68886892
\item The specified template argument values are substituted for the
68896893
corresponding template parameters as specified below.
@@ -7806,8 +7810,9 @@
78067810
then \tcode{F} is more specialized than \tcode{G}.
78077811

78087812
\pnum
7809-
In most cases, all template parameters must have values in order for
7810-
deduction to succeed, but for partial ordering purposes a template
7813+
In most cases,
7814+
deduction fails if not all template parameters have values,
7815+
but for partial ordering purposes a template
78117816
parameter may remain without a value provided it is not used in the
78127817
types being used for partial ordering.
78137818
\begin{note}
@@ -7916,7 +7921,8 @@
79167921
participate in template argument deduction.
79177922
That is,
79187923
they may be used to determine the value of a template argument, and
7919-
the value so determined must be consistent with the values determined
7924+
template argument deduction fails if
7925+
the value so determined is not consistent with the values determined
79207926
elsewhere.
79217927
In certain contexts, however, the value does not
79227928
participate in type deduction, but instead uses the values of template

source/threads.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2940,7 +2940,7 @@
29402940
\pnum
29412941
\begin{note}
29422942
The supplied lock will be held until the thread exits, and care
2943-
must be taken to ensure that this does not cause deadlock due to lock
2943+
should be taken to ensure that this does not cause deadlock due to lock
29442944
ordering issues. After calling \tcode{notify_all_at_thread_exit} it is
29452945
recommended that the thread should be exited as soon as possible, and
29462946
that no blocking or time-consuming tasks are run on that thread.
@@ -3031,8 +3031,8 @@
30313031
threads shall have been notified; they may subsequently block on the lock specified in the
30323032
wait.
30333033
This relaxes the usual rules, which would have required all wait calls to happen before
3034-
destruction. Only the notification to unblock the wait must happen before destruction.
3035-
The user must take care to ensure that no threads wait on \tcode{*this} once the destructor has
3034+
destruction. Only the notification to unblock the wait needs to happen before destruction.
3035+
The user should take care to ensure that no threads wait on \tcode{*this} once the destructor has
30363036
been started, especially when the waiting threads are calling the wait functions in a loop or
30373037
using the overloads of \tcode{wait}, \tcode{wait_for}, or \tcode{wait_until} that take a predicate.
30383038
\end{note}
@@ -3345,7 +3345,7 @@
33453345
requirements\iref{thread.req.lockable.basic}. \begin{note} All of the standard
33463346
mutex types meet this requirement. If a \tcode{Lock} type other than one of the
33473347
standard mutex types or a \tcode{unique_lock} wrapper for a standard mutex type
3348-
is used with \tcode{condition_variable_any}, the user must ensure that any
3348+
is used with \tcode{condition_variable_any}, the user should ensure that any
33493349
necessary synchronization is in place with respect to the predicate associated
33503350
with the \tcode{condition_variable_any} instance. \end{note}
33513351

@@ -3416,8 +3416,8 @@
34163416
threads shall have been notified; they may subsequently block on the lock specified in the
34173417
wait.
34183418
This relaxes the usual rules, which would have required all wait calls to happen before
3419-
destruction. Only the notification to unblock the wait must happen before destruction.
3420-
The user must take care to ensure that no threads wait on \tcode{*this} once the destructor has
3419+
destruction. Only the notification to unblock the wait needs to happen before destruction.
3420+
The user should take care to ensure that no threads wait on \tcode{*this} once the destructor has
34213421
been started, especially when the waiting threads are calling the wait functions in a loop or
34223422
using the overloads of \tcode{wait}, \tcode{wait_for}, or \tcode{wait_until} that take a predicate.
34233423
\end{note}
@@ -4890,7 +4890,7 @@
48904890
\tcode{future<invoke_result_t<decay_t<F>, decay_t<Args>...>{>}} that refers
48914891
to the shared state created by this call to \tcode{async}.
48924892
\begin{note} If a future obtained from \tcode{async} is moved outside the local scope,
4893-
other code that uses the future must be aware that the future's destructor may
4893+
other code that uses the future should be aware that the future's destructor may
48944894
block for the shared state to become ready. \end{note}
48954895

48964896
\pnum

source/utilities.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7016,7 +7016,7 @@
70167016
\requires No bytes in the specified range
70177017
are currently registered with
70187018
\tcode{declare_no_pointers()}. If the specified range is in an allocated object,
7019-
then it must be entirely within a single allocated object. The object must be
7019+
then it shall be entirely within a single allocated object. The object shall be
70207020
live until the corresponding \tcode{undeclare_no_pointers()} call. \begin{note} In
70217021
a garbage-collecting implementation, the fact that a region in an object is
70227022
registered with \tcode{declare_no_pointers()} should not prevent the object from
@@ -7046,12 +7046,12 @@
70467046

70477047
\begin{itemdescr}
70487048
\pnum
7049-
\requires The same range must previously have been passed to
7049+
\requires The same range shall previously have been passed to
70507050
\tcode{declare_no_pointers()}.
70517051

70527052
\pnum
70537053
\effects Unregisters a range registered with \tcode{declare_no_pointers()} for
7054-
destruction. It must be called before the lifetime of the object ends.
7054+
destruction. It shall be called before the lifetime of the object ends.
70557055

70567056
\pnum
70577057
\throws Nothing.
@@ -7962,7 +7962,7 @@
79627962
Let the notation \textit{u.p} denote the pointer stored by \textit{u}, and
79637963
let \textit{u.d} denote the associated deleter. Upon request, \textit{u} can
79647964
\defn{reset} (replace) \textit{u.p} and \textit{u.d} with another pointer and
7965-
deleter, but must properly dispose of its owned object via the associated
7965+
deleter, but properly disposes of its owned object via the associated
79667966
deleter before such replacement is considered completed.
79677967

79687968
\pnum
@@ -7977,7 +7977,7 @@
79777977
transferred to \textit{u2.d}.
79787978
\end{itemize}
79797979

7980-
As in the case of a reset, \textit{u2} must properly dispose of its pre-transfer
7980+
As in the case of a reset, \textit{u2} properly disposes of its pre-transfer
79817981
owned object via the pre-transfer associated deleter before the ownership
79827982
transfer is considered complete. \begin{note} A deleter's state need never be
79837983
copied, only moved or swapped as ownership is transferred. \end{note}
@@ -9433,7 +9433,7 @@
94339433

94349434
\pnum
94359435
\begin{note} To avoid the possibility of a dangling pointer, the
9436-
user of this constructor must ensure that \tcode{p} remains valid at
9436+
user of this constructor should ensure that \tcode{p} remains valid at
94379437
least until the ownership group of \tcode{r} is destroyed. \end{note}
94389438

94399439
\pnum
@@ -15691,7 +15691,7 @@
1569115691
instantiating that template with a template-argument that is a class
1569215692
template specialization may result in the implicit instantiation of
1569315693
the template argument if and only if the semantics of \tcode{X} require that
15694-
the argument must be a complete type.
15694+
the argument is a complete type.
1569515695

1569615696
\pnum
1569715697
For the purpose of defining the templates in this subclause,

0 commit comments

Comments
 (0)