Skip to content

Commit cb07613

Browse files
jensmaurerzygoloid
authored andcommitted
[std] Remove 'should' and 'may' from footnotes.
Partially addresses ISO/CS 017 (C++20 DIS)
1 parent de9ea0d commit cb07613

14 files changed

+51
-36
lines changed

source/algorithms.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -4453,7 +4453,7 @@
44534453
Copies elements in the range \range{first}{last}
44544454
into the range \range{result - $N$}{result}
44554455
starting from \tcode{last - 1} and proceeding to \tcode{first}.%
4456-
\footnote{\tcode{copy_backward} should be used instead of copy
4456+
\footnote{\tcode{copy_backward} can be used instead of copy
44574457
when \tcode{last} is in the range \range{result - $N$}{result}.}
44584458
For each positive integer $n \le N$,
44594459
performs \tcode{*(result - $n$) = *(last - $n$)}.
@@ -4604,7 +4604,7 @@
46044604
Moves elements in the range \range{first}{last}
46054605
into the range \range{result - $N$}{result}
46064606
starting from \tcode{last - 1} and proceeding to \tcode{first}.%
4607-
\footnote{\tcode{move_backward} should be used instead of move
4607+
\footnote{\tcode{move_backward} can be used instead of move
46084608
when \tcode{last} is in the range \range{result - $N$}{result}.}
46094609
For each positive integer $n \le N$,
46104610
performs \tcode{*(result - $n$) = $E$}.

source/basic.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@
15311531
A name used in the definition of a class \tcode{X}%
15321532
\footnote{This
15331533
refers to unqualified names following the class name;
1534-
such a name may be used in a \grammarterm{base-specifier} or
1534+
such a name might be used in a \grammarterm{base-specifier} or
15351535
in the \grammarterm{member-specification} of the class definition.}
15361536
outside of a complete-class context\iref{class.mem} of \tcode{X}
15371537
shall be declared in one of the following ways:

source/containers.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -5844,7 +5844,7 @@
58445844
\throws
58455845
\tcode{length_error} if \tcode{n >
58465846
max_size()}.\footnote{\tcode{reserve()} uses \tcode{Allocator::allocate()} which
5847-
may throw an appropriate exception.}
5847+
can throw an appropriate exception.}
58485848

58495849
\pnum
58505850
\complexity

source/declarations.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -7598,7 +7598,7 @@
75987598
An ambiguity exists if the best match finds two functions with the same
75997599
signature, even if one is in a namespace reachable through
76007600
\grammarterm{using-directive}{s} in the namespace of the other.\footnote{During
7601-
name lookup in a class hierarchy, some ambiguities may be
7601+
name lookup in a class hierarchy, some ambiguities can be
76027602
resolved by considering whether one member hides the other along some
76037603
paths\iref{class.member.lookup}. There is no such disambiguation when
76047604
considering the set of names found as a result of following

source/expressions.tex

+8-8
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
whose type is not similar\iref{conv.qual} to
293293
one of the following types the behavior is
294294
undefined:\footnote{The intent of this list is to specify those circumstances in which an
295-
object may or may not be aliased.}
295+
object can or cannot be aliased.}
296296
\begin{itemize}
297297
\item the dynamic type of the object,
298298

@@ -3932,7 +3932,7 @@
39323932
\pnum
39333933
An object pointer
39343934
can be explicitly converted to an object pointer of a different type.\footnote{The
3935-
types may have different \cv-qualifiers, subject to
3935+
types can have different \cv-qualifiers, subject to
39363936
the overall
39373937
restriction that a \tcode{reinterpret_cast} cannot cast away constness.}
39383938
When a prvalue \tcode{v} of object pointer type is converted to
@@ -3972,7 +3972,7 @@
39723972
A prvalue of type ``pointer to member of \tcode{X} of type \tcode{T1}''
39733973
can be explicitly converted to a prvalue of a different type ``pointer to member of
39743974
\tcode{Y} of type \tcode{T2}'' if \tcode{T1} and \tcode{T2} are both
3975-
function types or both object types.\footnote{\tcode{T1} and \tcode{T2} may have
3975+
function types or both object types.\footnote{\tcode{T1} and \tcode{T2} can have
39763976
different \cv-qualifiers, subject to
39773977
the overall restriction that a \tcode{reinterpret_cast} cannot cast away
39783978
constness.} The null member pointer value\iref{conv.mem} is converted to the
@@ -4572,7 +4572,7 @@
45724572
potentially-overlapping subobject is
45734573
the size of the type, not the size of the subobject.%
45744574
\footnote{The actual size of a potentially-overlapping subobject
4575-
may be less than the result of
4575+
can be less than the result of
45764576
applying \tcode{sizeof} to the subobject, due to virtual base classes
45774577
and less strict padding requirements on potentially-overlapping subobjects.}
45784578
\indextext{array!\idxcode{sizeof}}%
@@ -5176,7 +5176,7 @@
51765176

51775177
\pnum
51785178
\indextext{\idxcode{new}!exception and}%
5179-
If any part of the object initialization described above\footnote{This may
5179+
If any part of the object initialization described above\footnote{This might
51805180
include evaluating a \grammarterm{new-initializer} and/or calling
51815181
a constructor.}
51825182
terminates by throwing an exception and a suitable deallocation function
@@ -7317,7 +7317,7 @@
73177317
that is usable in constant expressions or
73187318
has constant initialization\iref{basic.start.static}.%
73197319
\footnote{Testing this condition
7320-
may involve a trial evaluation of its initializer as described above.}
7320+
might involve a trial evaluation of its initializer as described above.}
73217321
\begin{example}
73227322
\begin{codeblock}
73237323
template<bool> struct X {};
@@ -7358,12 +7358,12 @@
73587358

73597359
\item
73607360
an immediate subexpression of a \grammarterm{braced-init-list},%
7361-
\footnote{Constant evaluation may be necessary to determine whether a narrowing conversion is performed\iref{dcl.init.list}.}
7361+
\footnote{Constant evaluation might be necessary to determine whether a narrowing conversion is performed\iref{dcl.init.list}.}
73627362

73637363
\item
73647364
an expression of the form \tcode{\&} \grammarterm{cast-expression}
73657365
that occurs within a templated entity,%
7366-
\footnote{Constant evaluation may be necessary to determine whether such an expression is value-dependent\iref{temp.dep.constexpr}.}
7366+
\footnote{Constant evaluation might be necessary to determine whether such an expression is value-dependent\iref{temp.dep.constexpr}.}
73677367
or
73687368

73697369
\item

source/future.tex

+5-2
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,6 @@
865865
How many additional write positions are made
866866
available is otherwise unspecified.%
867867
\indextext{unspecified}%
868-
\footnote{An implementation should consider \tcode{alsize} in making this
869-
decision.}
870868
If \tcode{palloc} is not a null pointer, the function calls
871869
\tcode{(*palloc)(n)}
872870
to allocate the new dynamic array object.
@@ -890,6 +888,11 @@
890888
or if
891889
\tcode{(strmode \& frozen) != 0},
892890
the function cannot extend the array (reallocate it with greater length) to make a write position available.
891+
892+
\pnum
893+
\recommended
894+
An implementation should consider \tcode{alsize} in making the
895+
decision how many additional write positions to make available.
893896
\end{itemdescr}
894897

895898
\indexlibrarymember{pbackfail}{strstreambuf}%

source/iostreams.tex

+6-1
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,11 @@
431431
time prior to or during the first time an object of class
432432
\tcode{ios_base::Init} is constructed, and in any case before the body
433433
of \tcode{main}\iref{basic.start.main} begins execution.
434+
435+
\recommended
436+
If it is possible for them to do so, implementations should
437+
initialize the objects earlier than required.
438+
434439
The objects are not destroyed during program execution.\footnote{Constructors and destructors for objects with
435440
static storage duration can
436441
access these objects to read input from
@@ -3047,7 +3052,7 @@
30473052
Initializes:\footnote{The default constructor is protected for class
30483053
\tcode{basic_streambuf}
30493054
to assure that only objects for classes
3050-
derived from this class may be constructed.}
3055+
derived from this class can be constructed.}
30513056
\begin{itemize}
30523057
\item
30533058
all pointer member objects to null pointers,

source/iterators.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@
593593
that designate the beginning and end of the computation, or an iterator and a
594594
count that designate the beginning and the number of elements to which the
595595
computation is to be applied.\footnote{The sentinel denoting the end of a range
596-
may have the same type as the iterator denoting the beginning of the range, or a
596+
can have the same type as the iterator denoting the beginning of the range, or a
597597
different type.}
598598

599599
\pnum

source/lex.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,9 @@
637637
specified in \tref{lex.name.disallowed}.
638638
Upper- and lower-case letters are
639639
different. All characters are significant.\footnote{On systems in which linkers cannot accept extended
640-
characters, an encoding of the \grammarterm{universal-character-name} may be used in
640+
characters, an encoding of the \grammarterm{universal-character-name} can be used in
641641
forming valid external identifiers. For example, some otherwise unused
642-
character or sequence of characters may be used to encode the
642+
character or sequence of characters can be used to encode the
643643
\tcode{\textbackslash u} in a \grammarterm{universal-character-name}. Extended
644644
characters may produce a long external identifier, but \Cpp{} does not
645645
place a translation limit on significant characters for external

source/lib-intro.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@
851851
or namespaces nested within namespace
852852
\tcode{std}.\footnote{The C standard library headers\iref{depr.c.headers} also define
853853
names within the global namespace, while the \Cpp{} headers for C library
854-
facilities\iref{headers} may also define names within the global namespace.}%
854+
facilities\iref{headers} can also define names within the global namespace.}%
855855
\indextext{namespace}
856856
It is unspecified whether names declared in a specific namespace are declared
857857
directly in that namespace or in an inline namespace inside that
@@ -2209,7 +2209,7 @@
22092209
that meets the minimum requirements
22102210
of this document.
22112211
Therefore
2212-
an implementation may elect,
2212+
an implementation can elect,
22132213
under the as-if rule\iref{intro.execution},
22142214
to provide any customization point
22152215
in the form
@@ -2775,7 +2775,7 @@
27752775
described in \ref{\firstlibchapter} through \ref{\lastlibchapter} and
27762776
\ref{depr} shall behave as if the implementation declared no additional
27772777
non-member function signatures.\footnote{A valid \Cpp{} program always
2778-
calls the expected library non-member function. An implementation may
2778+
calls the expected library non-member function. An implementation can
27792779
also define additional non-member functions that would otherwise not
27802780
be called by a valid \Cpp{} program.}
27812781

source/locales.tex

+16-9
Original file line numberDiff line numberDiff line change
@@ -2153,8 +2153,8 @@
21532153
constant number of \tcode{externT} characters needed to produce an internal
21542154
character; or \tcode{0} if this number is not a constant.\footnote{If \tcode{encoding()}
21552155
yields \tcode{-1}, then more than \tcode{max_length()} \tcode{externT} elements
2156-
may be consumed when producing a single \tcode{internT} character, and additional
2157-
\tcode{externT} elements may appear at the end of a sequence after those that
2156+
can be consumed when producing a single \tcode{internT} character, and additional
2157+
\tcode{externT} elements can appear at the end of a sequence after those that
21582158
yield the final \tcode{internT} character.}
21592159
\end{itemdescr}
21602160

@@ -3749,7 +3749,7 @@
37493749
An enumeration value indicating the preferred order of components for
37503750
those date formats that are composed of day, month, and year.\footnote{This
37513751
function is intended as a convenience only, for common
3752-
formats, and may return
3752+
formats, and can return
37533753
\tcode{no_order}
37543754
in valid locales.}
37553755
Returns
@@ -4057,15 +4057,15 @@
40574057
interpreted identically as the format specifiers in the string
40584058
argument to the standard library function
40594059
\indexlibraryglobal{strftime}%
4060-
\tcode{strftime()}\footnote{Interpretation of the \tcode{modifier}
4061-
argument is implementation-defined, but should follow POSIX
4062-
conventions.},
4060+
\tcode{strftime()},
40634061
except that the sequence of characters produced for those specifiers
40644062
that are described as depending on the C locale are instead \impldef{formatted character
40654063
sequence generated by \tcode{time_put::do_put} in C
4066-
locale}.\footnote{Implementations should refer to other standards
4067-
such as POSIX
4068-
for these definitions.}
4064+
locale}.
4065+
\begin{note}
4066+
Interpretation of the \tcode{modifier}
4067+
argument is implementation-defined.
4068+
\end{note}
40694069

40704070
\pnum
40714071
\returns
@@ -4075,6 +4075,13 @@
40754075
formats or by derivations. A space character is a reasonable
40764076
default for this argument.
40774077
\end{note}
4078+
4079+
\pnum
4080+
\recommended
4081+
Interpretation of the \tcode{modifier} should follow POSIX conventions.
4082+
Implementations should refer to other standards such as POSIX
4083+
for a specification of the character sequences produced for
4084+
those specifiers described as depending on the C locale.
40784085
\end{itemdescr}
40794086

40804087
\rSec3[locale.time.put.byname]{Class template \tcode{time_put_byname}}

source/modules.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@
526526
non-exported \grammarterm{module-import-declaration}{s}
527527
in the module unit purview of $U$.\footnote{This is consistent
528528
with the rules for visibility of imported names\iref{basic.scope.namespace}.}
529-
These rules may in turn lead to the importation of yet more
529+
These rules can in turn lead to the importation of yet more
530530
translation units.
531531

532532
\pnum

source/numerics.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -2316,7 +2316,7 @@
23162316
\tcode{E(q)}%
23172317
\indextext{constructor!random number engine requirement}\footnote{ This constructor
23182318
(as well as the subsequent corresponding \tcode{seed()} function)
2319-
may be particularly useful
2319+
can be particularly useful
23202320
to applications requiring
23212321
a large number of independent random sequences.
23222322
}
@@ -7125,7 +7125,7 @@
71257125
that has zero length.\footnote{This default constructor is essential,
71267126
since arrays of
71277127
\tcode{valarray}
7128-
may be useful.
7128+
can be useful.
71297129
After initialization, the length of an empty array can be increased with the
71307130
\tcode{resize}
71317131
member function.}
@@ -8176,7 +8176,7 @@
81768176
Such a slice is specified by a starting index, a length, and a
81778177
stride.\footnote{BLAS stands for
81788178
\textit{Basic Linear Algebra Subprograms.}
8179-
\Cpp{} programs may instantiate this class.
8179+
\Cpp{} programs can instantiate this class.
81808180
See, for example,
81818181
Dongarra, Du Croz, Duff, and Hammerling:
81828182
\textit{A set of Level 3 Basic Linear Algebra Subprograms};

source/overloading.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@
12331233
is applied to the value returned, with the original second
12341234
operand.\footnote{If the value returned by the
12351235
\tcode{\keyword{operator}->}
1236-
function has class type, this may result in selecting and calling another
1236+
function has class type, this can result in selecting and calling another
12371237
\tcode{\keyword{operator}->}
12381238
function.
12391239
The process repeats until an

0 commit comments

Comments
 (0)