Skip to content

Commit 921ef04

Browse files
jensmaurerzygoloid
authored andcommitted
Replace 'encouraged' with 'should'.
Consistent with ISO Directives, Part 2, encouragement for implementations is supposed to use 'should', not 'encouraged'. Fixes #1601.
1 parent 89fccb3 commit 921ef04

File tree

10 files changed

+24
-24
lines changed

10 files changed

+24
-24
lines changed

source/declarations.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4001,7 +4001,7 @@
40014001
a warning that an implementation might otherwise issue
40024002
for a case or default label that is reachable
40034003
from another case or default label along some path of execution.
4004-
Implementations are encouraged to issue a warning
4004+
Implementations should issue a warning
40054005
if a fallthrough statement is not dynamically reachable.
40064006
\end{note}
40074007

@@ -4042,7 +4042,7 @@
40424042
\pnum
40434043
\begin{note}
40444044
For an entity marked \tcode{maybe_unused}, implementations
4045-
are encouraged not to emit a warning that the entity is unused, or
4045+
should not emit a warning that the entity is unused, or
40464046
that the entity is used despite the presence of the attribute.
40474047
\end{note}
40484048

@@ -4062,7 +4062,7 @@
40624062
assert(b);
40634063
}
40644064
\end{codeblock}
4065-
Implementations are encouraged not to warn that \tcode{b} is unused,
4065+
Implementations should not warn that \tcode{b} is unused,
40664066
whether or not \tcode{NDEBUG} is defined.
40674067
\end{example}
40684068

@@ -4084,7 +4084,7 @@
40844084
marked \tcode{nodiscard}. Appearance of a nodiscard call as
40854085
a potentially-evaluated discarded-value expression (Clause~\ref{expr})
40864086
is discouraged unless explicitly cast to \tcode{void}.
4087-
Implementations are encouraged to issue a warning in such cases.
4087+
Implementations should issue a warning in such cases.
40884088
This is typically because discarding the return value
40894089
of a nodiscard call has surprising consequences.
40904090
\end{note}
@@ -4121,7 +4121,7 @@
41214121
\pnum
41224122
If a function \tcode{f} is called where \tcode{f} was previously declared with the \tcode{noreturn}
41234123
attribute and \tcode{f} eventually returns, the behavior is undefined. \begin{note} The function may
4124-
terminate by throwing an exception. \end{note} \begin{note} Implementations are encouraged to issue a
4124+
terminate by throwing an exception. \end{note} \begin{note} Implementations should issue a
41254125
warning if a function marked \tcode{[[noreturn]]} might return. \end{note}
41264126

41274127
\pnum

source/expressions.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5233,7 +5233,7 @@
52335233
imposes no restrictions on the accuracy of floating-point operations, it is unspecified whether the
52345234
evaluation of a floating-point expression during translation yields the same result as the
52355235
evaluation of the same expression (or the same operations on the same values) during program
5236-
execution.\footnote{Nonetheless, implementations are encouraged to provide consistent results,
5236+
execution.\footnote{Nonetheless, implementations should provide consistent results,
52375237
irrespective of whether the evaluation was performed during translation and/or during program
52385238
execution.} \begin{example}
52395239

source/intro.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1609,7 +1609,7 @@
16091609
\tcode{std::thread}~(\ref{thread.thread.class}) provide concurrent forward progress
16101610
guarantees.
16111611
\begin{note}
1612-
General-purpose implementations are encouraged to provide these guarantees.
1612+
General-purpose implementations should provide these guarantees.
16131613
\end{note}
16141614

16151615
\pnum

source/iostreams.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@
410410
The objects are constructed and the associations are established at some
411411
time prior to or during the first time an object of class
412412
\tcode{ios_base::Init} is constructed, and in any case before the body
413-
of \tcode{main}~(\ref{basic.start.main}) begins execution.\footnote{If it is possible for them to do so, implementations are encouraged to
413+
of \tcode{main}~(\ref{basic.start.main}) begins execution.\footnote{If it is possible for them to do so, implementations should
414414
initialize the objects earlier than required.}
415415
The objects are not destroyed during program execution.\footnote{Constructors and destructors for static objects can
416416
access these objects to read input from
@@ -9948,10 +9948,10 @@
99489948
operating system or other APIs. \end{note}
99499949

99509950
\pnum
9951-
Implementations are encouraged to provide such behavior as it is defined by
9951+
Implementations should provide such behavior as it is defined by
99529952
POSIX. Implementations shall document any behavior that differs from the
99539953
behavior defined by POSIX. Implementations that do not support exact POSIX
9954-
behavior are encouraged to provide behavior as close to POSIX behavior as is reasonable given the
9954+
behavior should provide behavior as close to POSIX behavior as is reasonable given the
99559955
limitations of actual operating systems and file systems. If an implementation cannot provide any
99569956
reasonable behavior, the implementation shall report an error as specified in~\ref{fs.err.report}.
99579957
\begin{note} This allows users to rely on an exception being thrown or
@@ -12335,7 +12335,7 @@
1233512335
\begin{itemdescr}
1233612336
\pnum
1233712337
\returns A string containing \tcode{runtime_error::what()}. The exact format is unspecified.
12338-
Implementations are encouraged but not required to include \tcode{path1.native_string()}
12338+
Implementations should include \tcode{path1.native_string()}
1233912339
if not empty, \tcode{path2.native_string()} if not empty, and \tcode{system_error::what()} strings in the returned
1234012340
string.
1234112341
\end{itemdescr}
@@ -12744,7 +12744,7 @@
1274412744
such as hard link count, status, symlink status, file size, and last write time.
1274512745

1274612746
\pnum
12747-
Implementations are encouraged to store such additional file attributes
12747+
Implementations should store such additional file attributes
1274812748
during directory iteration if their values are available
1274912749
and storing the values would allow the implementation to eliminate file system accesses
1275012750
by \tcode{directory_entry} observer functions~(\ref{fs.op.funcs}).
@@ -15226,8 +15226,8 @@
1522615226
\postconditions The returned path is in normal form~(\ref{fs.def.normal.form}).
1522715227

1522815228
\pnum
15229-
\remarks Implementations are encouraged
15230-
to avoid unnecessary normalization such as
15229+
\remarks Implementations should
15230+
avoid unnecessary normalization such as
1523115231
when \tcode{canonical} has already been called on the entirety of \tcode{p}.
1523215232

1523315233
\pnum

source/lib-intro.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2974,10 +2974,10 @@
29742974
operating system} \tcode{error_category} object for errors originating elsewhere.
29752975
The implementation shall define the possible values of \tcode{value()} for each of these
29762976
error categories. \begin{example} For operating systems that are based on POSIX,
2977-
implementations are encouraged to define the \tcode{std::system_category()} values as
2977+
implementations should define the \tcode{std::system_category()} values as
29782978
identical to the POSIX \tcode{errno} values, with additional values as defined by the
29792979
operating system's documentation. Implementations for operating systems that are not
2980-
based on POSIX are encouraged to define values identical to the operating system's
2980+
based on POSIX should define values identical to the operating system's
29812981
values. For errors that do not originate from the operating system, the implementation
29822982
may provide enums for the associated values. \end{example}
29832983

source/locales.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4074,7 +4074,7 @@
40744074
except that the sequence of characters produced for those specifiers
40754075
that are described as depending on the C locale are instead \impldef{formatted character
40764076
sequence generated by \tcode{time_put::do_put} in C
4077-
locale}.\footnote{Implementations are encouraged to refer to other standards
4077+
locale}.\footnote{Implementations should refer to other standards
40784078
such as POSIX
40794079
for these definitions.}
40804080

source/special.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@
543543
S a { 1, {2,3} };
544544
S* p = new S{ 1, {2,3} }; // Creates dangling reference
545545
\end{codeblock}
546-
\end{example} \begin{note} This may introduce a dangling reference, and implementations are encouraged to issue a warning in such a case. \end{note}
546+
\end{example} \begin{note} This may introduce a dangling reference, and implementations should issue a warning in such a case. \end{note}
547547
\end{itemize}
548548

549549
\pnum

source/strings.tex

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

52945294
\pnum
52955295
Member functions in this section have complexity \bigoh{\tcode{size() * str.size()}} at worst,
5296-
although implementations are encouraged to do better.
5296+
although implementations should do better.
52975297

52985298
\pnum
52995299
Each member function of the form

source/threads.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4217,7 +4217,7 @@
42174217
is undefined.
42184218
\begin{note} It is valid to move from a future object for which \tcode{valid() == false}.
42194219
\end{note}
4220-
\begin{note} Implementations are encouraged to detect this case and throw an object of type
4220+
\begin{note} Implementations should detect this case and throw an object of type
42214221
\tcode{future_error} with an error condition of \tcode{future_errc::no_state}. \end{note}
42224222

42234223
\indexlibrary{\idxcode{future}}%
@@ -4502,7 +4502,7 @@
45024502
\tcode{valid()} on a \tcode{shared_future} object for which \tcode{valid() == false} is undefined.
45034503
\begin{note} It is valid to copy or move from a \tcode{shared_future}
45044504
object for which \tcode{valid()} is \tcode{false}. \end{note}
4505-
\begin{note} Implementations are encouraged to detect this case and throw an object of type
4505+
\begin{note} Implementations should detect this case and throw an object of type
45064506
\tcode{future_error} with an error condition of \tcode{future_errc::no_state}. \end{note}
45074507

45084508
\indexlibrary{\idxcode{shared_future}}%

source/utilities.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14598,7 +14598,7 @@
1459814598
a specialization of \tcode{reference_wrapper} or
1459914599
a function pointer. Otherwise, may throw \tcode{bad_alloc}
1460014600
or any exception thrown by the copy constructor of the stored callable object.
14601-
\begin{note} Implementations are encouraged to avoid the use of
14601+
\begin{note} Implementations should avoid the use of
1460214602
dynamically allocated memory for small callable objects, for example, where
1460314603
\tcode{f}'s target is an object holding only a pointer or reference
1460414604
to an object and a member function pointer. \end{note}
@@ -14622,7 +14622,7 @@
1462214622
a function pointer. Otherwise, may throw \tcode{bad_alloc} or
1462314623
any exception thrown by the copy or move constructor
1462414624
of the stored callable object.
14625-
\begin{note} Implementations are encouraged to avoid the use of
14625+
\begin{note} Implementations should avoid the use of
1462614626
dynamically allocated memory for small callable objects, for example,
1462714627
where \tcode{f}'s target is an object holding only a pointer or reference
1462814628
to an object and a member function pointer. \end{note}
@@ -14654,7 +14654,7 @@
1465414654
\pnum
1465514655
Otherwise, \tcode{*this} targets a copy of \tcode{f}
1465614656
initialized with \tcode{std::move(f)}.
14657-
\begin{note} Implementations are encouraged to avoid the use of
14657+
\begin{note} Implementations should avoid the use of
1465814658
dynamically allocated memory for small callable objects, for example,
1465914659
where \tcode{f} is an object holding only a pointer or
1466014660
reference to an object and a member function pointer. \end{note}

0 commit comments

Comments
 (0)