Skip to content

Commit 270dc04

Browse files
committed
[std] Replace 'might' with 'can' in notes and examples
1 parent 2e455af commit 270dc04

21 files changed

+86
-85
lines changed

source/algorithms.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -5020,7 +5020,7 @@
50205020
do not overlap.
50215021
\begin{note}
50225022
For the overload with an \tcode{ExecutionPolicy},
5023-
there might be a performance cost
5023+
there can be a performance cost
50245024
if \tcode{iterator_traits<For\-ward\-It\-er\-ator1>::value_type}
50255025
is not \oldconcept{\-Move\-Constructible} (\tref{cpp17.moveconstructible}).
50265026
\end{note}
@@ -5943,7 +5943,7 @@
59435943
do not overlap.
59445944
\begin{note}
59455945
For the overloads with an \tcode{ExecutionPolicy},
5946-
there might be a performance cost
5946+
there can be a performance cost
59475947
if \tcode{iterator_traits<ForwardIterator1>::value_type} does not meet
59485948
the \oldconcept{\-Move\-Constructible} (\tref{cpp17.moveconstructible}) requirements.
59495949
\end{note}
@@ -6130,7 +6130,7 @@
61306130
\oldconcept{CopyAssignable} requirements.
61316131
\begin{note}
61326132
For the overloads with an \tcode{ExecutionPolicy},
6133-
there might be a performance cost
6133+
there can be a performance cost
61346134
if the value type of \tcode{ForwardIterator1} does not meet both the
61356135
\oldconcept{CopyConstructible} and \oldconcept{CopyAssignable} requirements.
61366136
\end{note}
@@ -7717,7 +7717,7 @@
77177717

77187718
\begin{note}
77197719
For the overload with an \tcode{ExecutionPolicy},
7720-
there might be a performance cost if \tcode{first}'s value type
7720+
there can be a performance cost if \tcode{first}'s value type
77217721
does not meet the \oldconcept{CopyConstructible} requirements.
77227722
\end{note}
77237723

source/basic.tex

+15-15
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@
790790
appearing in the type of \tcode{D} can result
791791
in the different declarations having distinct types, and
792792
\grammarterm{lambda-expression}{s} appearing in a default argument of \tcode{D}
793-
might still denote different types in different translation units.
793+
can still denote different types in different translation units.
794794
\end{note}
795795

796796
\pnum
@@ -1512,7 +1512,7 @@
15121512
any declaration in the same translation unit
15131513
whose locus\iref{basic.scope.pdecl} is before $P$.
15141514
\begin{note}
1515-
The declaration might appear in a scope that does not contain $P$.
1515+
The declaration can appear in a scope that does not contain $P$.
15161516
\end{note}
15171517
\indextext{precede|see{declaration, precede}}%
15181518
A declaration $X$ \defnx{precedes}{declaration!precede}
@@ -1795,7 +1795,7 @@
17951795
\pnum
17961796
\begin{note}
17971797
Even if the result of name lookup is unambiguous, use of a name found in
1798-
multiple subobjects might still be
1798+
multiple subobjects can still be
17991799
ambiguous\iref{conv.mem,expr.ref,class.access.base}.
18001800
\end{note}
18011801
\begin{example}
@@ -3116,7 +3116,7 @@
31163116
or a maximal sequence of adjacent bit-fields all having nonzero width.
31173117
\begin{note}
31183118
Various
3119-
features of the language, such as references and virtual functions, might
3119+
features of the language, such as references and virtual functions, can
31203120
involve additional memory locations that are not accessible to programs but are
31213121
managed by the implementation.
31223122
\end{note}
@@ -4277,7 +4277,7 @@
42774277
When \tcode{D} is the type of a complete object, it will have a subobject of
42784278
type \tcode{B}, so it must be aligned appropriately for a \tcode{\keyword{long} \keyword{double}}.
42794279
If \tcode{D} appears as a subobject of another object that also has \tcode{B}
4280-
as a virtual base class, the \tcode{B} subobject might be part of a different
4280+
as a virtual base class, the \tcode{B} subobject can be part of a different
42814281
subobject, reducing the alignment requirements on the \tcode{D} subobject.
42824282
\end{example}
42834283
The result of the \keyword{alignof} operator reflects the alignment
@@ -4590,7 +4590,7 @@
45904590

45914591
\item A temporary bound to a reference in a \grammarterm{new-initializer}\iref{expr.new} persists until the completion of the full-expression containing the \grammarterm{new-initializer}.
45924592
\begin{note}
4593-
This might introduce a dangling reference.
4593+
This can introduce a dangling reference.
45944594
\end{note}
45954595
\begin{example}
45964596
\begin{codeblock}
@@ -4759,7 +4759,7 @@
47594759
constexpr std::size_t N = sizeof(T);
47604760
char buf[N];
47614761
T obj; // \tcode{obj} initialized to its original value
4762-
std::memcpy(buf, &obj, N); // between these two calls to \tcode{std::memcpy}, \tcode{obj} might be modified
4762+
std::memcpy(buf, &obj, N); // between these two calls to \tcode{std::memcpy}, \tcode{obj} can be modified
47634763
std::memcpy(&obj, buf, N); // at this point, each subobject of \tcode{obj} of scalar type holds its original value
47644764
\end{codeblock}
47654765
\end{example}
@@ -4960,7 +4960,7 @@
49604960
\end{itemize}
49614961
\begin{note}
49624962
A literal type is one for which
4963-
it might be possible to create an object
4963+
it is possible to create an object
49644964
within a constant expression.
49654965
It is not a guarantee that it is possible to create such an object,
49664966
nor is it a guarantee that any object of that type
@@ -5515,7 +5515,7 @@
55155515
an invocation of a deallocation function\iref{basic.stc.dynamic.deallocation},
55165516
and \impldef{invalid pointer value in the context of an evaluation} otherwise.
55175517
\begin{footnote}
5518-
Some implementations might define that
5518+
Some implementations can define that
55195519
copying such a pointer value causes a system-generated runtime fault.
55205520
\end{footnote}
55215521
\begin{note}
@@ -6140,7 +6140,7 @@
61406140
initial value of the object, a value assigned to the object by $T$, or a
61416141
value assigned to the object by another thread, according to the rules below.
61426142
\begin{note}
6143-
In some cases, there might instead be undefined behavior. Much of this
6143+
In some cases, there can instead be undefined behavior. Much of this
61446144
subclause is motivated by the desire to support atomic operations with explicit
61456145
and detailed visibility constraints. However, it also implicitly supports a
61466146
simpler view for more restricted programs.
@@ -6507,19 +6507,19 @@
65076507
\begin{note}
65086508
Compiler transformations that introduce assignments to a potentially
65096509
shared memory location that would not be modified by the abstract machine are
6510-
generally precluded by this document, since such an assignment might overwrite
6510+
generally precluded by this document, since such an assignment can overwrite
65116511
another assignment by a different thread in cases in which an abstract machine
65126512
execution would not have encountered a data race. This includes implementations
65136513
of data member assignment that overwrite adjacent members in separate memory
65146514
locations. Reordering of atomic loads in cases in which the atomics in question
6515-
might alias is also generally precluded, since this could violate the coherence
6515+
can alias is also generally precluded, since this could violate the coherence
65166516
rules.
65176517
\end{note}
65186518

65196519
\pnum
65206520
\begin{note}
65216521
Transformations that introduce a speculative read of a potentially
6522-
shared memory location might not preserve the semantics of the \Cpp{} program as
6522+
shared memory location can not preserve the semantics of the \Cpp{} program as
65236523
defined in this document, since they potentially introduce a data race. However,
65246524
they are typically valid in the context of an optimizing compiler that targets a
65256525
specific machine with well-defined semantics for data races. They would be
@@ -6560,7 +6560,7 @@
65606560
a lock-free execution in that thread shall complete.
65616561
\begin{note}
65626562
Concurrently executing threads
6563-
might prevent progress of a lock-free execution.
6563+
can prevent progress of a lock-free execution.
65646564
For example,
65656565
this situation can occur
65666566
with load-locked store-conditional implementations.
@@ -6680,7 +6680,7 @@
66806680
guarantees, which in turn are stronger than weakly parallel forward progress
66816681
guarantees.
66826682
\begin{note}
6683-
For example, some kinds of synchronization between threads of execution might only
6683+
For example, some kinds of synchronization between threads of execution can only
66846684
make progress if the respective threads of execution provide parallel forward progress
66856685
guarantees, but will fail to make progress under weakly parallel guarantees.
66866686
\end{note}

source/classes.tex

+7-7
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@
12981298
\begin{note}
12991299
An implicitly-declared default constructor has an
13001300
exception specification\iref{except.spec}.
1301-
An explicitly-defaulted definition might have an
1301+
An explicitly-defaulted definition can have an
13021302
implicit exception specification, see~\ref{dcl.fct.def}.
13031303
\end{note}
13041304

@@ -1501,7 +1501,7 @@
15011501

15021502
\begin{note}
15031503
When the move constructor is not implicitly declared or explicitly supplied,
1504-
expressions that otherwise would have invoked the move constructor might instead invoke
1504+
expressions that otherwise would have invoked the move constructor can instead invoke
15051505
a copy constructor.
15061506
\end{note}
15071507

@@ -2110,7 +2110,7 @@
21102110
\begin{note}
21112111
A
21122112
\tcode{return}
2113-
statement\iref{stmt.return} in a destructor might not directly return to the
2113+
statement\iref{stmt.return} in a destructor can not directly return to the
21142114
caller; before transferring control to the caller, the destructors for the
21152115
members and bases are called.
21162116
\end{note}
@@ -4050,7 +4050,7 @@
40504050
\grammarterm{pure-specifier}\iref{class.mem} in the function declaration
40514051
in the class definition.
40524052
\begin{note}
4053-
Such a function might be inherited: see below.
4053+
Such a function can be inherited: see below.
40544054
\end{note}
40554055
A class is an \defnadj{abstract}{class}
40564056
if it has at least one pure virtual function.
@@ -4420,7 +4420,7 @@
44204420
\begin{note}
44214421
In a derived class, the lookup of a base class name will find the
44224422
injected-class-name instead of the name of the base class in the scope
4423-
in which it was declared. The injected-class-name might be less accessible
4423+
in which it was declared. The injected-class-name can be less accessible
44244424
than the name of the base class in the scope in which it was declared.
44254425
\end{note}
44264426

@@ -6030,7 +6030,7 @@
60306030
struct X { X(A*); };
60316031

60326032
struct E : C, D, X {
6033-
E() : D(this), // undefined behavior: upcast from \tcode{E*} to \tcode{A*} might use path \tcode{E*} $\rightarrow$ \tcode{D*} $\rightarrow$ \tcode{A*}
6033+
E() : D(this), // undefined behavior: upcast from \tcode{E*} to \tcode{A*} can use path \tcode{E*} $\rightarrow$ \tcode{D*} $\rightarrow$ \tcode{A*}
60346034
// but \tcode{D} is not constructed
60356035

60366036
// ``\tcode{D((C*)this)}\!'' would be defined: \tcode{E*} $\rightarrow$ \tcode{C*} is defined because \tcode{E()} has started,
@@ -6702,7 +6702,7 @@
67026702
the expression resulting from the interpretation of \tcode{x @ y}
67036703
using the selected rewritten candidate\iref{over.match.oper}
67046704
does not result in a usable candidate
6705-
(for example, that expression might be \tcode{(x <=> y) @ 0}), or
6705+
(for example, that expression can be \tcode{(x <=> y) @ 0}), or
67066706

67076707
\item
67086708
\tcode{x @ y} cannot be implicitly converted to \tcode{bool}.

source/compatibility.tex

+5-5
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@
571571
Correct contradictory wording and
572572
improve implementation flexibility for performance.
573573
\effect
574-
Valid \CppXX{} code using a barrier might have
574+
Valid \CppXX{} code using a barrier can have
575575
different semantics in this revision of \Cpp{}
576576
if it depends on a completion function's side effects occurring exactly once,
577577
on a specific thread running the phase completion step, or
@@ -1138,7 +1138,7 @@
11381138
\rationale
11391139
Improve efficiency and convenience of finding number of removed elements.
11401140
\effect
1141-
Code that depends on the return types might have different semantics in this revision of \Cpp{}.
1141+
Code that depends on the return types can have different semantics in this revision of \Cpp{}.
11421142
Translation units compiled against this version of \Cpp{} may be incompatible with
11431143
translation units compiled against \CppXVII{}, either failing to link or having undefined behavior.
11441144

@@ -1568,7 +1568,7 @@
15681568
New reserved namespaces.
15691569
\rationale
15701570
Reserve namespaces for future revisions of the standard library
1571-
that might otherwise be incompatible with existing programs.
1571+
that can otherwise be incompatible with existing programs.
15721572
\effect
15731573
The global namespaces \tcode{std}
15741574
followed by an arbitrary sequence of \grammarterm{digit}{s}\iref{lex.name}
@@ -1737,7 +1737,7 @@
17371737
void operator delete(void*, std::size_t) noexcept;
17381738
\end{codeblock}
17391739
In this revision of \Cpp{}, however, the declaration of \tcode{operator delete}
1740-
might match a predefined usual (non-placement)
1740+
can match a predefined usual (non-placement)
17411741
\tcode{operator delete}\iref{basic.stc.dynamic}. If so, the
17421742
program is ill-formed, as it was for class member allocation functions and
17431743
deallocation functions\iref{expr.new}.
@@ -2503,7 +2503,7 @@
25032503
to ``array of \tcode{const wchar_t}''.
25042504
\rationale
25052505
This avoids calling an inappropriate overloaded function,
2506-
which might expect to be able to modify its argument.
2506+
which can expect to be able to modify its argument.
25072507
\effect
25082508
Change to semantics of well-defined feature.
25092509
\difficulty

source/containers.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -22334,7 +22334,7 @@
2233422334
\pnum
2233522335
\begin{note}
2233622336
Concrete accessor policies can impose preconditions for their \tcode{access} function.
22337-
However, they might not.
22337+
However, they can not.
2233822338
For example, an accessor where
2233922339
\tcode{p} is \tcode{span<A::element_type, dynamic_extent>} and
2234022340
\tcode{access(p, i)} returns \tcode{p[i \% p.size()]}

source/declarations.tex

+9-8
Original file line numberDiff line numberDiff line change
@@ -4370,7 +4370,7 @@
43704370
any default argument associated with any reachable declaration that inhabits $S$
43714371
is available to the call.
43724372
\begin{note}
4373-
The candidate might have been found through a \grammarterm{using-declarator}
4373+
The candidate can be found through a \grammarterm{using-declarator}
43744374
from which the declaration that provides the default argument is not reachable.
43754375
\end{note}
43764376

@@ -4944,7 +4944,7 @@
49444944
no constructor of the object's class
49454945
is invoked for the initialization.
49464946
\begin{note}
4947-
Such an object might have been value-initialized
4947+
Such an object can be value-initialized
49484948
or initialized by aggregate initialization\iref{dcl.init.aggr}
49494949
or by an inherited constructor\iref{class.inhctor.init}.
49504950
\end{note}
@@ -8454,7 +8454,7 @@
84548454
\begin{note}
84558455
Some of the properties associated with an entity with language linkage
84568456
are specific to each implementation and are not described here. For
8457-
example, a particular language linkage might be associated with a
8457+
example, a particular language linkage can be associated with a
84588458
particular form of representing names of objects and functions with
84598459
external linkage, or with a particular calling convention, etc.
84608460
\end{note}
@@ -9039,7 +9039,7 @@
90399039
\pnum
90409040
\begin{note}
90419041
The \tcode{carries_dependency} attribute does not change the meaning of the
9042-
program, but might result in generation of more efficient code.
9042+
program, but can result in generation of more efficient code.
90439043
\end{note}
90449044

90459045
\pnum
@@ -9082,8 +9082,9 @@
90829082
hardware memory ordering instructions (a.k.a.\ fences).
90839083
Function \tcode{g}'s second parameter has a \tcode{carries_dependency} attribute,
90849084
but its first parameter does not. Therefore, function \tcode{h}'s first call to
9085-
\tcode{g} carries a dependency into \tcode{g}, but its second call does not. The
9086-
implementation might need to insert a fence prior to the second call to
9085+
\tcode{g} carries a dependency into \tcode{g}, but its second call does not.
9086+
It is possible that the
9087+
implementation needs to insert a fence prior to the second call to
90879088
\tcode{g}.
90889089
\end{example}
90899090
\indextext{attribute|)}%
@@ -9169,7 +9170,7 @@
91699170
\pnum
91709171
\recommended
91719172
The use of a fallthrough statement should suppress
9172-
a warning that an implementation might otherwise issue
9173+
a warning that an implementation can otherwise issue
91739174
for a case or default label that is reachable
91749175
from another case or default label along some path of execution.
91759176
The value of
@@ -9498,7 +9499,7 @@
94989499
\pnum
94999500
\recommended
95009501
Implementations should issue a
9501-
warning if a function marked \tcode{[[noreturn]]} might return.
9502+
warning if a function marked \tcode{[[noreturn]]} can return.
95029503
The value of
95039504
a \grammarterm{has-attribute-expression} for the \tcode{noreturn} attribute
95049505
should be \tcode{0} unless the implementation can issue such warnings.

source/diagnostics.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@
10771077
What constitutes correspondence for any given operating system is unspecified.
10781078
\begin{note}
10791079
The number of potential system error codes is large
1080-
and unbounded, and some might not correspond to any POSIX \tcode{errno} value. Thus
1080+
and unbounded, and some can not correspond to any POSIX \tcode{errno} value. Thus
10811081
implementations are given latitude in determining correspondence.
10821082
\end{note}
10831083
\end{itemdescr}
@@ -1719,7 +1719,7 @@
17191719
An \ntbs{} incorporating the arguments supplied in the constructor.
17201720

17211721
\begin{note}
1722-
The returned \ntbs{} might be the contents of \tcode{what_arg + ": " +
1722+
The returned \ntbs{} can be the contents of \tcode{what_arg + ": " +
17231723
code.message()}.
17241724
\end{note}
17251725
\end{itemdescr}

source/exceptions.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@
817817
the function \tcode{std::terminate} is invoked\iref{except.terminate}.
818818
\begin{note}
819819
An implementation is not permitted to reject an expression merely because, when
820-
executed, it throws or might
820+
executed, it throws or can
821821
throw an exception from a function with a non-throwing exception specification.
822822
\end{note}
823823
\begin{example}

0 commit comments

Comments
 (0)