Skip to content

Commit 29c0e48

Browse files
jensmaurertkoeppe
authored andcommitted
[std] Remove problematic 'requires' phrases from notes.
Only specific phrases involving the word "required" are problematic, namely when they appear to establish a normative requirement. They have been reworded, often by replacing "is required" with "needs", sometimes with slightly larger edits.
1 parent 61be6a5 commit 29c0e48

File tree

12 files changed

+32
-37
lines changed

12 files changed

+32
-37
lines changed

source/basic.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6538,7 +6538,7 @@
65386538
the implementation ensures that the thread will eventually make progress for as
65396539
long as it has not terminated.
65406540
\begin{note}
6541-
This is required regardless of whether or not other threads of execution (if any)
6541+
This is regardless of whether or not other threads of execution (if any)
65426542
have been or are making progress. To eventually fulfill this requirement means that
65436543
this will happen in an unspecified but finite amount of time.
65446544
\end{note}

source/classes.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@
13301330
\indextext{constructor!implicitly invoked}%
13311331
A default constructor is implicitly invoked to initialize
13321332
a class object when no initializer is specified\iref{dcl.init.general}.
1333-
Such a default constructor is required to be accessible\iref{class.access}.
1333+
Such a default constructor needs to be accessible\iref{class.access}.
13341334
\end{note}
13351335

13361336
\pnum

source/containers.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2719,7 +2719,7 @@
27192719
and \tcode{mapped_type}.
27202720
\begin{note}
27212721
For example, in some cases \tcode{key_type} and \tcode{mapped_type}
2722-
are required to be \oldconcept{CopyAssignable} even though the associated
2722+
need to be \oldconcept{CopyAssignable} even though the associated
27232723
\tcode{value_type}, \tcode{pair<const key_type, mapped_type>}, is not
27242724
\oldconcept{CopyAssignable}.
27252725
\end{note}
@@ -4217,7 +4217,7 @@
42174217
apply instead to \tcode{key_type} and \tcode{mapped_type}.
42184218
\begin{note}
42194219
For example, \tcode{key_type} and \tcode{mapped_type}
4220-
are sometimes required to be \oldconcept{CopyAssignable}
4220+
sometimes need to be \oldconcept{CopyAssignable}
42214221
even though the associated \tcode{value_type},
42224222
\tcode{pair<const key_type, mapped_type>},
42234223
is not \oldconcept{CopyAssignable}.

source/declarations.tex

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,10 +1268,10 @@
12681268
\indextext{\idxcode{volatile}!implementation-defined}%
12691269
\begin{note}
12701270
\tcode{volatile} is a hint to the implementation to avoid aggressive
1271-
optimization involving the object because the value of the object might
1272-
be changed by means undetectable by an implementation.
1273-
Furthermore, for some implementations, \tcode{volatile} might indicate that
1274-
special hardware instructions are required to access the object.
1271+
optimization involving the object because it is possible for the value of the object
1272+
to change by means undetectable by an implementation.
1273+
Furthermore, for some implementations, \tcode{volatile} can indicate that
1274+
special hardware instructions are needed to access the object.
12751275
See~\ref{intro.execution} for detailed semantics. In general, the
12761276
semantics of \tcode{volatile} are intended to be the same in \Cpp{} as
12771277
they are in C.
@@ -5394,8 +5394,7 @@
53945394
\begin{note}
53955395
As specified above, brace elision cannot apply to
53965396
subaggregates with no elements; an
5397-
\grammarterm{initializer-clause} for the entire subobject is
5398-
required.
5397+
\grammarterm{initializer-clause} for the entire subobject is needed.
53995398
\end{note}
54005399

54015400
\begin{example}
@@ -6084,7 +6083,7 @@
60846083
corresponding element of the initializer list, and the
60856084
\tcode{std::initializer_list<E>} object is constructed to refer to that array.
60866085
\begin{note}
6087-
A constructor or conversion function selected for the copy is required to be
6086+
A constructor or conversion function selected for the copy needs to be
60886087
accessible\iref{class.access} in the context of the initializer list.
60896088
\end{note}
60906089
If a narrowing conversion is required to initialize any of the elements,

source/expressions.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,7 @@
14121412
\end{codeblock}
14131413
In each case, the constraints of \tcode{f} are not satisfied.
14141414
In the declaration of \tcode{p2},
1415-
those constraints are required to be satisfied
1415+
those constraints need to be satisfied
14161416
even though
14171417
\tcode{f} is an unevaluated operand\iref{term.unevaluated.operand}.
14181418
\end{example}
@@ -2182,7 +2182,7 @@
21822182
if the function call operator template specialization is an immediate function.
21832183
\begin{note}
21842184
This will result in the implicit instantiation of the generic lambda's body.
2185-
The instantiated generic lambda's return type and parameter types are required to match
2185+
The instantiated generic lambda's return type and parameter types need to match
21862186
the return type and parameter types of the pointer to function.
21872187
\end{note}
21882188
\begin{example}
@@ -3404,7 +3404,7 @@
34043404
A function can change the values of its non-const parameters, but these
34053405
changes cannot affect the values of the arguments except where a
34063406
parameter is of a reference type\iref{dcl.ref}; if the reference is to
3407-
a const-qualified type, \keyword{const_cast} is required to be used to
3407+
a const-qualified type, \keyword{const_cast} needs to be used to
34083408
cast away the constness in order to modify the argument's value. Where a
34093409
parameter is of \keyword{const} reference type a temporary object is
34103410
introduced if
@@ -5378,7 +5378,7 @@
53785378
and the deallocation function's name is
53795379
\tcode{\keyword{operator} \keyword{delete}[]}.
53805380
\begin{note}
5381-
An implementation is required to provide default definitions for the global
5381+
An implementation is expected to provide default definitions for the global
53825382
allocation
53835383
functions\iref{basic.stc.dynamic,new.delete.single,new.delete.array}.
53845384
A \Cpp{} program can provide alternative definitions of

source/iostreams.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@
918918
to class \tcode{ios_base::failure} shown in this subclause.
919919
\begin{note}
920920
When \tcode{ios_base::failure} is a synonym for another type,
921-
that type is required to provide a nested type \tcode{failure}
921+
that type needs to provide a nested type \tcode{failure}
922922
to emulate the injected-class-name.
923923
\end{note}
924924
The class
@@ -14384,7 +14384,7 @@
1438414384
\effects
1438514385
Each \grammarterm{directory-separator}
1438614386
of the pathname in the generic format
14387-
is converted to \grammarterm{preferred-separator}.
14387+
is converted to \grammarterm{preferred-separator}.
1438814388

1438914389
\pnum
1439014390
\returns
@@ -15161,8 +15161,8 @@
1516115161
\item The \grammarterm{root-name} element, if present.
1516215162
\item The \grammarterm{root-directory} element, if present.
1516315163
\begin{note}
15164-
The generic format is required to ensure lexicographical
15165-
comparison works correctly.
15164+
It is possible that the use of the generic format is needed
15165+
to ensure correct lexicographical comparison.
1516615166
\end{note}
1516715167
\item Each successive \grammarterm{filename} element, if present.
1516815168
\item An empty element, if a trailing non-root \grammarterm{directory-separator}

source/lex.tex

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,8 +665,7 @@
665665
(collectively, ``whitespace''), as described below, are ignored except
666666
as they serve to separate tokens.
667667
\begin{note}
668-
Some whitespace is
669-
required to separate otherwise adjacent identifiers, keywords, numeric
668+
Whitespace can separate otherwise adjacent identifiers, keywords, numeric
670669
literals, and alternative tokens containing alphabetic characters.
671670
\end{note}
672671
\indextext{token|)}
@@ -1851,7 +1850,7 @@
18511850

18521851
\pnum
18531852
\begin{note}
1854-
The characters \tcode{'('} and \tcode{')'} are permitted in a
1853+
The characters \tcode{'('} and \tcode{')'} can appear in a
18551854
\grammarterm{raw-string}. Thus, \tcode{R"delimiter((a|b))delimiter"} is equivalent to
18561855
\tcode{"(a|b)"}.
18571856
\end{note}

source/lib-intro.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@
14551455
It is unspecified to which module a declaration in the standard library
14561456
is attached.
14571457
\begin{note}
1458-
Implementations are required to ensure that mixing
1458+
Conforming implementations ensure that mixing
14591459
\tcode{\#include} and \tcode{import} does not result in
14601460
conflicting attachments\iref{basic.link}.
14611461
\end{note}

source/templates.tex

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6317,7 +6317,7 @@
63176317
into the templated function, variable, or class
63186318
are two declarations of the same entity.
63196319
\begin{note}
6320-
These declarations are required to have matching types as specified in~\ref{basic.link}, except as specified in~\ref{except.spec}.
6320+
These declarations need to have matching types as specified in~\ref{basic.link}, except as specified in~\ref{except.spec}.
63216321
\begin{example}
63226322
\begin{codeblock}
63236323
template<typename T> T var = {};
@@ -6367,7 +6367,7 @@
63676367

63686368
\pnum
63696369
\begin{note}
6370-
An explicit instantiation of a constrained template is required
6370+
An explicit instantiation of a constrained template needs
63716371
to satisfy that template's associated constraints\iref{temp.constr.decl}.
63726372
The satisfaction of constraints is determined
63736373
% FIXME: What is a "template name"? Does this mean "simple-template-id"?
@@ -6514,10 +6514,9 @@
65146514
An explicit specialization does not introduce a name\iref{basic.scope.scope}.
65156515
A declaration of a function template, class template, or variable template being explicitly
65166516
specialized shall be reachable from the declaration of
6517-
the explicit
6518-
specialization.
6517+
the explicit specialization.
65196518
\begin{note}
6520-
A declaration, but not a definition of the template is required.
6519+
A declaration, but not a definition of the template is needed.
65216520
\end{note}
65226521
The definition of a class or class template shall be reachable from the
65236522
declaration of an explicit specialization for a member template of the class
@@ -6708,7 +6707,7 @@
67086707

67096708
\pnum
67106709
\begin{note}
6711-
An explicit specialization of a constrained template is required
6710+
An explicit specialization of a constrained template needs
67126711
to satisfy that template's associated constraints\iref{temp.constr.decl}.
67136712
The satisfaction of constraints is determined
67146713
when forming the template name of an explicit specialization
@@ -7305,10 +7304,8 @@
73057304
invalid type or expression is one that would be ill-formed, with a diagnostic
73067305
required, if written in the same context using the substituted arguments.
73077306
\begin{note}
7308-
If no
7309-
diagnostic is required, the program is still ill-formed. Access checking is done
7310-
as part of the substitution
7311-
process.
7307+
If no diagnostic is required, the program is still ill-formed.
7308+
Access checking is done as part of the substitution process.
73127309
\end{note}
73137310
Invalid types and expressions can result in a deduction failure
73147311
only in the immediate context of the deduction substitution loci.

source/threads.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6305,8 +6305,8 @@
63056305
\begin{note}
63066306
After a thread \tcode{A} has called \tcode{unlock()}, releasing a mutex, it is possible for another
63076307
thread \tcode{B} to lock the same mutex, observe that it is no longer in use, unlock it, and
6308-
destroy it, before thread \tcode{A} appears to have returned from its unlock call. Implementations
6309-
are required to handle such scenarios correctly, as long as thread \tcode{A} doesn't access the
6308+
destroy it, before thread \tcode{A} appears to have returned from its unlock call. Conforming implementations
6309+
handle such scenarios correctly, as long as thread \tcode{A} does not access the
63106310
mutex after the unlock call returns. These cases typically occur when a reference-counted object
63116311
contains a mutex that is used to protect the reference count.
63126312
\end{note}

source/time.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7923,7 +7923,7 @@
79237923
@\tcode{\placeholder{day}}@/@\tcode{\placeholder{month}}@/@\tcode{\placeholder{year}}@
79247924
\end{codeblock}
79257925

7926-
Anywhere a \tcode{\placeholder{day}} is required, any of the following can also be specified:
7926+
Anywhere a \tcode{\placeholder{day}} is needed, any of the following can also be specified:
79277927

79287928
\begin{codeblock}
79297929
last

source/utilities.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3002,7 +3002,7 @@
30023002
(or \tcode{u$_{\mathrm{tail}}$}) to be constructed. It might not
30033003
even be possible, as \tcode{t} and \tcode{u} are not required to be copy
30043004
constructible. Also, all comparison operator functions are short circuited;
3005-
they do not perform element accesses beyond what is required to determine the
3005+
they do not perform element accesses beyond what is needed to determine the
30063006
result of the comparison.
30073007
\end{note}
30083008

0 commit comments

Comments
 (0)