Skip to content

Commit 9ba035b

Browse files
committed
[std] Replace 'may' in notes.
1 parent 9c3a90c commit 9ba035b

25 files changed

+138
-145
lines changed

source/algorithms.tex

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
The number and order of deducible template parameters for algorithm declarations
262262
are unspecified, except where explicitly stated otherwise.
263263
\begin{note}
264-
Consequently, the algorithms may not
264+
Consequently, the algorithms cannot
265265
be called with explicitly-specified template argument lists.
266266
\end{note}
267267

@@ -388,7 +388,7 @@
388388
where \tcode{is_trivially_copy_constructible_v<T>}
389389
and \tcode{is_trivially_destructible_v<T>} are \tcode{true}.
390390
\begin{note}
391-
This implies that user-supplied function objects should not rely on
391+
This implies that user-supplied function objects cannot rely on
392392
object identity of arguments for such input sequences.
393393
Users for whom the object identity of the arguments to these function objects
394394
is important should consider using a wrapping iterator
@@ -413,7 +413,7 @@
413413
unsequenced with respect to one another in the calling thread of execution.
414414
\begin{note}
415415
This means that multiple function object invocations
416-
may be interleaved on a single thread of execution,
416+
can be interleaved on a single thread of execution,
417417
which overrides the usual guarantee from \ref{intro.execution}
418418
that function executions do not overlap with one another.
419419
\end{note}
@@ -499,7 +499,7 @@
499499
or threads of execution implicitly created by the library;
500500
the latter will provide weakly parallel forward progress guarantees.
501501
\begin{note}
502-
This means that multiple function object invocations may be interleaved
502+
This means that multiple function object invocations can be interleaved
503503
on a single thread of execution,
504504
which overrides the usual guarantee from \ref{intro.execution}
505505
that function executions do not overlap with one another.
@@ -3152,7 +3152,7 @@
31523152
starting from \tcode{first} and proceeding to \tcode{last - 1}.
31533153
\begin{note}
31543154
If the type of \tcode{first} meets the requirements of a mutable iterator,
3155-
\tcode{f} may apply non-constant functions through the dereferenced iterator.
3155+
\tcode{f} can apply non-constant functions through the dereferenced iterator.
31563156
\end{note}
31573157

31583158
\pnum
@@ -3187,7 +3187,7 @@
31873187
every iterator in the range \range{first}{last}.
31883188
\begin{note}
31893189
If the type of \tcode{first} meets the requirements of a mutable iterator,
3190-
\tcode{f} may apply non-constant functions through the dereferenced iterator.
3190+
\tcode{f} can apply non-constant functions through the dereferenced iterator.
31913191
\end{note}
31923192

31933193
\pnum
@@ -3228,7 +3228,7 @@
32283228
starting from \tcode{first} and proceeding to \tcode{last - 1}.
32293229
\begin{note}
32303230
If the result of \tcode{invoke(proj, *i)} is a mutable reference,
3231-
\tcode{f} may apply non-constant functions.
3231+
\tcode{f} can apply non-constant functions.
32323232
\end{note}
32333233

32343234
\pnum
@@ -3280,7 +3280,7 @@
32803280
every iterator in the range \range{first}{first + n} in order.
32813281
\begin{note}
32823282
If the type of \tcode{first} meets the requirements of a mutable iterator,
3283-
\tcode{f} may apply non-constant functions through the dereferenced iterator.
3283+
\tcode{f} can apply non-constant functions through the dereferenced iterator.
32843284
\end{note}
32853285

32863286
\pnum
@@ -3319,7 +3319,7 @@
33193319
every iterator in the range \range{first}{first + n}.
33203320
\begin{note}
33213321
If the type of \tcode{first} meets the requirements of a mutable iterator,
3322-
\tcode{f} may apply non-constant functions through the dereferenced iterator.
3322+
\tcode{f} can apply non-constant functions through the dereferenced iterator.
33233323
\end{note}
33243324

33253325
\pnum
@@ -3354,7 +3354,7 @@
33543354
\range{first}{first + n} in order.
33553355
\begin{note}
33563356
If the result of \tcode{invoke(proj, *i)} is a mutable reference,
3357-
\tcode{f} may apply non-constant functions.
3357+
\tcode{f} can apply non-constant functions.
33583358
\end{note}
33593359

33603360
\pnum
@@ -4398,7 +4398,7 @@
43984398
do not overlap.
43994399
\begin{note}
44004400
For the overload with an \tcode{ExecutionPolicy},
4401-
there may be a performance cost
4401+
there might be a performance cost
44024402
if \tcode{iterator_traits<ForwardIterator1>::value_type}
44034403
is not \oldconcept{\-Move\-Constructible} (\tref{cpp17.moveconstructible}).
44044404
\end{note}
@@ -5296,7 +5296,7 @@
52965296
do not overlap.
52975297
\begin{note}
52985298
For the overloads with an \tcode{ExecutionPolicy},
5299-
there may be a performance cost
5299+
there might be a performance cost
53005300
if \tcode{iterator_traits<ForwardIterator1>::value_type} does not meet
53015301
the \oldconcept{\-Move\-Constructible} (\tref{cpp17.moveconstructible}) requirements.
53025302
\end{note}
@@ -5483,7 +5483,7 @@
54835483
\oldconcept{CopyAssignable} requirements.
54845484
\begin{note}
54855485
For the overloads with an \tcode{ExecutionPolicy},
5486-
there may be a performance cost
5486+
there might be a performance cost
54875487
if the value type of \tcode{ForwardIterator1} does not meet both the
54885488
\oldconcept{CopyConstructible} and \oldconcept{CopyAssignable} requirements.
54895489
\end{note}
@@ -7019,7 +7019,7 @@
70197019

70207020
\begin{note}
70217021
For the overload with an \tcode{ExecutionPolicy},
7022-
there may be a performance cost if \tcode{first}'s value type
7022+
there might be a performance cost if \tcode{first}'s value type
70237023
does not meet the \oldconcept{CopyConstructible} requirements.
70247024
\end{note}
70257025

@@ -9537,7 +9537,7 @@
95379537
that \tcode{exclusive_scan} excludes the $i^\text{th}$ input element
95389538
from the $i^\text{th}$ sum.
95399539
If \tcode{binary_op} is not mathematically associative,
9540-
the behavior of \tcode{exclusive_scan} may be nondeterministic.
9540+
the behavior of \tcode{exclusive_scan} is nondeterministic.
95419541
\end{note}
95429542
\end{itemdescr}
95439543

@@ -9664,7 +9664,7 @@
96649664
that \tcode{inclusive_scan} includes the $i^\text{th}$ input element
96659665
in the $i^\text{th}$ sum.
96669666
If \tcode{binary_op} is not mathematically associative,
9667-
the behavior of \tcode{inclusive_scan} may be nondeterministic.
9667+
the behavior of \tcode{inclusive_scan} is nondeterministic.
96689668
\end{note}
96699669
\end{itemdescr}
96709670

@@ -9739,7 +9739,7 @@
97399739
\tcode{transform_inclusive_scan} is that \tcode{transform_exclusive_scan}
97409740
excludes the $i^\text{th}$ input element from the $i^\text{th}$ sum.
97419741
If \tcode{binary_op} is not mathematically associative,
9742-
the behavior of \tcode{transform_exclusive_scan} may be nondeterministic.
9742+
the behavior of \tcode{transform_exclusive_scan} is nondeterministic.
97439743
\tcode{transform_exclusive_scan}
97449744
does not apply \tcode{unary_op} to \tcode{init}.
97459745
\end{note}
@@ -9843,7 +9843,7 @@
98439843
\tcode{transform_inclusive_scan} is that \tcode{transform_inclusive_scan}
98449844
includes the $i^\text{th}$ input element in the $i^\text{th}$ sum.
98459845
If \tcode{binary_op} is not mathematically associative,
9846-
the behavior of \tcode{transform_inclusive_scan} may be nondeterministic.
9846+
the behavior of \tcode{transform_inclusive_scan} is nondeterministic.
98479847
\tcode{transform_inclusive_scan} does not
98489848
apply \tcode{unary_op} to \tcode{init}.
98499849
\end{note}

source/atomics.tex

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@
527527
r2 = x.load(memory_order::relaxed);
528528
y.store(r2, memory_order::relaxed);
529529
\end{codeblock}
530-
should not produce \tcode{r1 == r2 == 42}, since the store of 42 to \tcode{y} is only
530+
it is not desirable to produce \tcode{r1 == r2 == 42}, since the store of 42 to \tcode{y} is only
531531
possible if the store to \tcode{x} stores \tcode{42}, which circularly depends on the
532532
store to \tcode{y} storing \tcode{42}. Note that without this restriction, such an
533533
execution is possible.
@@ -634,8 +634,9 @@
634634
block\iref{intro.progress}.
635635

636636
\pnum
637+
Operations that are lock-free should also be address-free.
637638
\begin{note}
638-
Operations that are lock-free should also be address-free. That is,
639+
That is,
639640
atomic operations on the same memory location via two different addresses will
640641
communicate atomically. The implementation should not depend on any
641642
per-process state. This restriction enables communication by memory that is
@@ -1600,7 +1601,7 @@
16001601
is \tcode{false}.
16011602
\begin{note}
16021603
Type arguments that are
1603-
not also statically initializable may be difficult to use.
1604+
not also statically initializable might be difficult to use.
16041605
\end{note}
16051606

16061607
\pnum
@@ -3440,10 +3441,7 @@
34403441

34413442
\pnum
34423443
Operations on an object of type \tcode{atomic_flag} shall be lock-free.
3443-
\begin{note}
3444-
Hence
3445-
the operations should also be address-free.
3446-
\end{note}
3444+
The operations should also be address-free.
34473445

34483446
\pnum
34493447
The \tcode{atomic_flag} type is a standard-layout struct.

source/basic.tex

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -692,10 +692,10 @@
692692
The entity is still declared in multiple translation units, and \ref{basic.link}
693693
still applies to these declarations. In particular,
694694
\grammarterm{lambda-expression}{s}\iref{expr.prim.lambda}
695-
appearing in the type of \tcode{D} may result
695+
appearing in the type of \tcode{D} might result
696696
in the different declarations having distinct types, and
697697
\grammarterm{lambda-expression}{s} appearing in a default argument of \tcode{D}
698-
may still denote different types in different translation units.
698+
might still denote different types in different translation units.
699699
\end{note}
700700

701701
\pnum
@@ -822,9 +822,9 @@
822822
a name is introduced, which is not necessarily the same as the region in
823823
which the declaration occurs. In particular,
824824
\grammarterm{elaborated-type-specifier}{s}\iref{dcl.type.elab} and
825-
friend declarations\iref{class.friend} may introduce a (possibly not
825+
friend declarations\iref{class.friend} might introduce a (possibly not
826826
visible) name into an enclosing namespace; these restrictions apply to
827-
that region. Local extern declarations\iref{basic.link} may introduce
827+
that region. Local extern declarations\iref{basic.link} can introduce
828828
a name into the declarative region where the declaration appears and
829829
also introduce a (possibly not visible) name into an enclosing
830830
namespace; these restrictions apply to both regions.
@@ -2837,7 +2837,7 @@
28372837
\grammarterm{using-directive}{s}
28382838
do not declare entities.
28392839
Enumerators do not have linkage,
2840-
but may serve as the name of an enumeration with linkage\iref{dcl.enum}.
2840+
but might serve as the name of an enumeration with linkage\iref{dcl.enum}.
28412841
\end{note}
28422842

28432843
\pnum
@@ -4546,7 +4546,7 @@
45464546

45474547
\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}.
45484548
\begin{note}
4549-
This may introduce a dangling reference.
4549+
This might introduce a dangling reference.
45504550
\end{note}
45514551
\begin{example}
45524552
\begin{codeblock}
@@ -5817,7 +5817,7 @@
58175817
initial value of the object, a value assigned to the object by $T$, or a
58185818
value assigned to the object by another thread, according to the rules below.
58195819
\begin{note}
5820-
In some cases, there may instead be undefined behavior. Much of this
5820+
In some cases, there might instead be undefined behavior. Much of this
58215821
subclause is motivated by the desire to support atomic operations with explicit
58225822
and detailed visibility constraints. However, it also implicitly supports a
58235823
simpler view for more restricted programs.
@@ -5860,7 +5860,7 @@
58605860
There is a separate order for each
58615861
atomic object. There is no requirement that these can be combined into a single
58625862
total order for all objects. In general this will be impossible since different
5863-
threads may observe modifications to different objects in inconsistent orders.
5863+
threads might observe modifications to different objects in inconsistent orders.
58645864
\end{note}
58655865

58665866
\pnum
@@ -6189,14 +6189,14 @@
61896189
execution would not have encountered a data race. This includes implementations
61906190
of data member assignment that overwrite adjacent members in separate memory
61916191
locations. Reordering of atomic loads in cases in which the atomics in question
6192-
may alias is also generally precluded, since this may violate the coherence
6192+
might alias is also generally precluded, since this could violate the coherence
61936193
rules.
61946194
\end{note}
61956195

61966196
\pnum
61976197
\begin{note}
61986198
Transformations that introduce a speculative read of a potentially
6199-
shared memory location may not preserve the semantics of the \Cpp{} program as
6199+
shared memory location might not preserve the semantics of the \Cpp{} program as
62006200
defined in this document, since they potentially introduce a data race. However,
62016201
they are typically valid in the context of an optimizing compiler that targets a
62026202
specific machine with well-defined semantics for data races. They would be
@@ -6232,7 +6232,7 @@
62326232
a lock-free execution in that thread shall complete.
62336233
\begin{note}
62346234
Concurrently executing threads
6235-
may prevent progress of a lock-free execution.
6235+
might prevent progress of a lock-free execution.
62366236
For example,
62376237
this situation can occur
62386238
with load-locked store-conditional implementations.
@@ -6246,7 +6246,7 @@
62466246
to provide absolute guarantees to this effect,
62476247
since repeated and particularly inopportune interference
62486248
from other threads
6249-
may prevent forward progress,
6249+
could prevent forward progress,
62506250
e.g.,
62516251
by repeatedly stealing a cache line
62526252
for unrelated purposes
@@ -6314,9 +6314,7 @@
63146314
\tcode{std::thread}\iref{thread.thread.class}
63156315
or \tcode{std::jthread}\iref{thread.jthread.class}
63166316
provide concurrent forward progress guarantees.
6317-
\begin{note}
63186317
General-purpose implementations should provide these guarantees.
6319-
\end{note}
63206318

63216319
\pnum
63226320
\indextext{forward progress guarantees!parallel}%
@@ -6354,7 +6352,7 @@
63546352
guarantees, which in turn are stronger than weakly parallel forward progress
63556353
guarantees.
63566354
\begin{note}
6357-
For example, some kinds of synchronization between threads of execution may only
6355+
For example, some kinds of synchronization between threads of execution might only
63586356
make progress if the respective threads of execution provide parallel forward progress
63596357
guarantees, but will fail to make progress under weakly parallel guarantees.
63606358
\end{note}
@@ -6385,7 +6383,7 @@
63856383
stronger forward progress guarantee for a certain amount of time, due to a
63866384
second thread of execution $A$ being blocked on it with forward
63876385
progress guarantee delegation. In turn, if $B$ then blocks with
6388-
forward progress guarantee delegation on $C$, this may also temporarily
6386+
forward progress guarantee delegation on $C$, this could also temporarily
63896387
provide a stronger forward progress guarantee to $C$.
63906388
\end{note}
63916389

@@ -6575,10 +6573,10 @@
65756573
inline double fd() { return 1.0; }
65766574
extern double d1;
65776575
double d2 = d1; // unspecified:
6578-
// may be statically initialized to \tcode{0.0} or
6576+
// might be statically initialized to \tcode{0.0} or
65796577
// dynamically initialized to \tcode{0.0} if \tcode{d1} is
65806578
// dynamically initialized, or \tcode{1.0} otherwise
6581-
double d1 = fd(); // may be initialized statically or dynamically to \tcode{1.0}
6579+
double d1 = fd(); // either initialized statically or dynamically to \tcode{1.0}
65826580
\end{codeblock}
65836581
\end{note}
65846582

0 commit comments

Comments
 (0)