Skip to content

Commit 1274d64

Browse files
jensmaurertkoeppe
authored andcommitted
[std] Replace other forbidden words in notes and examples
Fixes ISO/CS comment (C++23 proof)
1 parent 2e70d07 commit 1274d64

13 files changed

+40
-44
lines changed

source/classes.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
\grammarterm{class-head} omits the
6666
\grammarterm{class-head-name} defines an \defnadj{unnamed}{class}.
6767
\begin{note}
68-
An unnamed class thus can't
68+
An unnamed class thus cannot
6969
be \tcode{final}.
7070
\end{note}
7171
Otherwise, the \grammarterm{class-name} is an \grammarterm{identifier};
@@ -1026,7 +1026,7 @@
10261026
Programs shall not define implicitly-declared special member functions.
10271027

10281028
\pnum
1029-
Programs may explicitly refer to implicitly-declared special member functions.
1029+
Programs can explicitly refer to implicitly-declared special member functions.
10301030
\begin{example}
10311031
A program may explicitly call or form a pointer to member
10321032
to an implicitly-declared special member function.

source/compatibility.tex

+9-9
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@
13911391
\rationale
13921392
Prevents accidental uses of trigraphs in non-raw string literals and comments.
13931393
\effect
1394-
Valid \CppXIV{} code that uses trigraphs may not be valid or may have different
1394+
Valid \CppXIV{} code that uses trigraphs can be invalid or have different
13951395
semantics in this revision of \Cpp{}. Implementations may choose to
13961396
translate trigraphs as specified in \CppXIV{} if they appear outside of a raw
13971397
string literal, as part of the \impldef{mapping input source file characters
@@ -1521,8 +1521,8 @@
15211521
\rationale
15221522
Better interaction with other language features.
15231523
\effect
1524-
Valid \CppXIV{} code that uses inheriting constructors may not be valid
1525-
or may have different semantics. A \grammarterm{using-declaration}
1524+
Valid \CppXIV{} code that uses inheriting constructors can be invalid
1525+
or have different semantics. A \grammarterm{using-declaration}
15261526
that names a constructor now makes the corresponding base class constructors
15271527
visible to initializations of the derived class
15281528
rather than declaring additional derived class constructors.
@@ -2218,7 +2218,7 @@
22182218
\rationale
22192219
Avoid hard to diagnose or non-portable constructs.
22202220
\effect
2221-
Names of attribute identifiers may not be used as macro names. Valid \CppIII{}
2221+
It is not allowed to use names of attribute identifiers as macro names. Valid \CppIII{}
22222222
code that defines \tcode{override}, \tcode{final},
22232223
\tcode{carries_dependency}, or \tcode{noreturn} as macros is invalid in this
22242224
revision of \Cpp{}.
@@ -2297,7 +2297,7 @@
22972297
Lack of specification of complexity of \tcode{size()} resulted in
22982298
divergent implementations with inconsistent performance characteristics.
22992299
\effect
2300-
Some container implementations that conform to \CppIII{} may not conform to the
2300+
It is possible that some container implementations that conform to \CppIII{} do not conform to the
23012301
specified \tcode{size()} requirements in this revision of \Cpp{}. Adjusting
23022302
containers such as \tcode{std::list} to the stricter requirements may require
23032303
incompatible changes.
@@ -2404,7 +2404,7 @@
24042404
\effect
24052405
Valid \CppIII{} code that uses implementation-specific knowledge about the
24062406
binary representation of the required template specializations of
2407-
\tcode{std::complex} may not be compatible with this revision of \Cpp{}.
2407+
\tcode{std::complex} can be incompatible with this revision of \Cpp{}.
24082408

24092409
\rSec2[diff.cpp03.locale]{\ref{localization}: localization library}
24102410

@@ -2414,7 +2414,7 @@
24142414
\rationale
24152415
Required by new feature.
24162416
\effect
2417-
Valid \CppIII{} code may have different behavior in this revision of \Cpp{}.
2417+
Valid \CppIII{} code can have different behavior in this revision of \Cpp{}.
24182418

24192419
\rSec2[diff.cpp03.input.output]{\ref{input.output}: input/output library}
24202420

@@ -3020,7 +3020,7 @@
30203020

30213021
\diffref{dcl.fct} [see \ref{expr.sizeof}]
30223022
\change
3023-
In \Cpp{}, types may not be defined in return or parameter types.
3023+
In \Cpp{}, defining types in return or parameter types is not allowed.
30243024
In C, these type definitions are allowed.
30253025

30263026
\begin{example}
@@ -3347,7 +3347,7 @@
33473347

33483348
\diffref{class.member.lookup}
33493349
\change
3350-
In \Cpp{}, a \grammarterm{typedef-name} may not be redeclared in a class definition after being used in that definition.
3350+
In \Cpp{}, it is not allowed to redeclare a \grammarterm{typedef-name} in a class definition after being used in that definition.
33513351

33523352
\begin{example}
33533353
\begin{codeblock}

source/concepts.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@
623623
\begin{note}
624624
This precludes calling unconstrained program-defined overloads of
625625
\tcode{swap}. When the deleted overload is viable, program-defined overloads
626-
need to be more specialized\iref{temp.func.order} to be selected.
626+
are only selected if they are more specialized\iref{temp.func.order}.
627627
\end{note}
628628

629629
\item

source/containers.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -22314,7 +22314,7 @@
2231422314
\pnum
2231522315
\begin{note}
2231622316
Concrete accessor policies can impose preconditions for their \tcode{access} function.
22317-
However, they can not.
22317+
However, it is possible that they do not.
2231822318
For example, an accessor where
2231922319
\tcode{p} is \tcode{span<A::element_type, dynamic_extent>} and
2232022320
\tcode{access(p, i)} returns \tcode{p[i \% p.size()]}

source/declarations.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -6291,7 +6291,7 @@
62916291
\end{itemize}
62926292

62936293
\begin{note}
6294-
As indicated above, such conversions are not allowed at the top level in
6294+
As indicated above, such conversions are not possible at the top level in
62956295
list-initializations.
62966296
\end{note}
62976297
\begin{example}
@@ -9377,7 +9377,7 @@
93779377
[[maybe_unused]] x:
93789378
}
93799379
\end{codeblock}
9380-
Implementations should not warn that \tcode{b} or \tcode{x} is unused,
9380+
Implementations are discouraged from warning that \tcode{b} or \tcode{x} is unused,
93819381
whether or not \tcode{NDEBUG} is defined.
93829382
\end{example}
93839383

source/exceptions.tex

+3-2
Original file line numberDiff line numberDiff line change
@@ -987,8 +987,9 @@
987987
A defaulted declaration does not require the
988988
exception specification of a base member function to be evaluated
989989
until the implicit exception specification of the derived
990-
function is needed, but an explicit \grammarterm{noexcept-specifier} needs
991-
the implicit exception specification to compare against.
990+
function is needed, but an explicit \grammarterm{noexcept-specifier}
991+
compares against
992+
the implicit exception specification.
992993
\end{note}
993994
\end{itemize}
994995
The exception specification of a defaulted

source/expressions.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1445,7 +1445,7 @@
14451445
\end{codeblock}
14461446
In each case, the constraints of \tcode{f} are not satisfied.
14471447
In the declaration of \tcode{p2},
1448-
those constraints need to be satisfied
1448+
those constraints are expected to be satisfied
14491449
even though
14501450
\tcode{f} is an unevaluated operand\iref{term.unevaluated.operand}.
14511451
\end{example}

source/iterators.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -1213,8 +1213,8 @@
12131213
the program is ill-formed, no diagnostic required.
12141214
\begin{note}
12151215
This precludes calling unconstrained \tcode{std::iter_swap}. When the deleted
1216-
overload is viable, program-defined overloads need to be more
1217-
specialized\iref{temp.func.order} to be selected.
1216+
overload is viable, program-defined overloads are only selected
1217+
if they are more specialized\iref{temp.func.order}.
12181218
\end{note}
12191219

12201220
\item Otherwise, if the types of \tcode{E1} and \tcode{E2} each model

source/memory.tex

+5-11
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,7 @@
21152115
Given an allocator type \tcode{X}\iref{allocator.requirements.general} and
21162116
letting \tcode{A} be a synonym for \tcode{allocator_traits<X>}, the types \tcode{A::pointer},
21172117
\tcode{A::const_pointer}, \tcode{A::void_pointer}, and \tcode{A::const_void_pointer}
2118-
may be used as \tcode{unique_ptr<T, D>::pointer}.
2118+
can be used as \tcode{unique_ptr<T, D>::pointer}.
21192119
\end{example}
21202120

21212121
\rSec4[unique.ptr.single.ctor]{Constructors}
@@ -4852,14 +4852,9 @@
48524852
\pnum
48534853
\tcode{operator()(x, y)} returns \tcode{x.owner_before(y)}.
48544854
\begin{note}
4855-
Note that
4856-
\begin{itemize}
4857-
\item \tcode{operator()} defines a strict weak ordering as defined in~\ref{alg.sorting};
4858-
4859-
\item
4855+
\tcode{operator()} defines a strict weak ordering as defined in~\ref{alg.sorting}.
48604856
\tcode{!operator()(a, b) \&\& !operator()(b, a)} is \tcode{true}
48614857
if and only if \tcode{a.owner_equal(b)} is \tcode{true}.
4862-
\end{itemize}
48634858
\end{note}
48644859

48654860
\rSec3[util.smartptr.owner.hash]{Struct \tcode{owner_hash}}
@@ -6231,10 +6226,9 @@
62316226
A \tcode{synchronized_pool_resource} may be accessed from multiple threads
62326227
without external synchronization
62336228
and may have thread-specific pools to reduce synchronization costs.
6234-
An \tcode{unsynchronized_pool_resource} class may not be accessed
6235-
from multiple threads simultaneously
6236-
and thus avoids the cost of synchronization entirely
6237-
in single-threaded applications.
6229+
Using an \tcode{unsynchronized_pool_resource} from multiple threads
6230+
results in potentially concurrent conflicting accesses\iref{intro.races},
6231+
but use within a single thread avoids the need for any synchronization.
62386232

62396233
\indexlibraryglobal{pool_options}%
62406234
\indexlibraryglobal{synchronized_pool_resource}%

source/support.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -6187,7 +6187,7 @@
61876187
\begin{example}
61886188
The header \libheader{cstdlib} assuredly
61896189
provides its declarations and definitions within the namespace
6190-
\tcode{std}. It may also provide these names within the
6190+
\tcode{std}. It can also provide these names within the
61916191
global namespace.
61926192
The header \libheader{stdlib.h}
61936193
assuredly provides the same declarations and definitions within

source/templates.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -6358,7 +6358,7 @@
63586358

63596359
\pnum
63606360
\begin{note}
6361-
An explicit instantiation of a constrained template needs
6361+
An explicit instantiation of a constrained template is expected
63626362
to satisfy that template's associated constraints\iref{temp.constr.decl}.
63636363
The satisfaction of constraints is determined
63646364
% FIXME: What is a "template name"? Does this mean "simple-template-id"?
@@ -6681,7 +6681,7 @@
66816681

66826682
\pnum
66836683
\begin{note}
6684-
An explicit specialization of a constrained template needs
6684+
An explicit specialization of a constrained template is expected
66856685
to satisfy that template's associated constraints\iref{temp.constr.decl}.
66866686
The satisfaction of constraints is determined
66876687
when forming the template name of an explicit specialization

source/threads.tex

+10-9
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@
5757
in~\ref{res.on.exception.handling}.
5858

5959
\begin{example}
60-
Consider a function in this Clause that is specified to throw exceptions of type
60+
If a function in this Clause is specified to throw exceptions of type
6161
\tcode{system_error} and specifies error conditions that include
6262
\tcode{operation_not_permitted} for a thread that does not have the privilege to
63-
perform the operation. Assume that, during the execution of this function, an \tcode{errno}
64-
of \tcode{EPERM} is reported by a POSIX API call used by the implementation. Since POSIX
63+
perform the operation, and if during the execution of this function, an \tcode{errno}
64+
of \tcode{EPERM} is reported by a POSIX API call used by the implementation, since POSIX
6565
specifies an \tcode{errno} of \tcode{EPERM} when ``the caller does not have the privilege
6666
to perform the operation'', the implementation maps \tcode{EPERM} to an
6767
\tcode{error_condition} of \tcode{operation_not_permitted}\iref{syserr} and an exception
@@ -2516,8 +2516,9 @@
25162516
\item \tcode{memory_order::consume}: a load operation performs a consume operation on the
25172517
affected memory location.
25182518
\begin{note}
2519-
Prefer \tcode{memory_order::acquire}, which provides stronger guarantees
2520-
than \tcode{memory_order::consume}. Implementations have found it infeasible
2519+
\tcode{memory_order::acquire}, which provides stronger guarantees
2520+
than \tcode{memory_order::consume}, is preferred.
2521+
Implementations have found it infeasible
25212522
to provide performance better than that of \tcode{memory_order::acquire}.
25222523
Specification revisions are under consideration.
25232524
\end{note}
@@ -2606,7 +2607,7 @@
26062607

26072608
\pnum
26082609
\begin{note}
2609-
We do not require that $S$ be consistent with
2610+
It is not necessary for $S$ to be consistent with
26102611
``happens before''\iref{intro.races}.
26112612
This allows more efficient implementation
26122613
of \tcode{memory_order::acquire} and \tcode{memory_order::release}
@@ -2908,14 +2909,14 @@
29082909

29092910
\pnum
29102911
\begin{note}
2911-
Hardware could require an object
2912+
Hardware can require an object
29122913
referenced by an \tcode{atomic_ref}
29132914
to have stricter alignment\iref{basic.align}
29142915
than other objects of type \tcode{T}.
29152916
Further, whether operations on an \tcode{atomic_ref}
2916-
are lock-free could depend on the alignment of the referenced object.
2917+
are lock-free can depend on the alignment of the referenced object.
29172918
For example, lock-free operations on \tcode{std::complex<double>}
2918-
could be supported only if aligned to \tcode{2*alignof(double)}.
2919+
can be restricted to alignment to \tcode{2*alignof(double)}.
29192920
\end{note}
29202921
\end{itemdescr}
29212922

source/utilities.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,7 @@
13591359
\begin{codeblock}
13601360
return pair<int, double>(5, 3.1415926); // explicit types
13611361
\end{codeblock}
1362-
a \Cpp{} program may contain:
1362+
a \Cpp{} program can contain:
13631363
\begin{codeblock}
13641364
return make_pair(5, 3.1415926); // types are deduced
13651365
\end{codeblock}

0 commit comments

Comments
 (0)