Skip to content

Commit b2df325

Browse files
authored
Replace "could" and "might", Clauses 16-32. (#4386)
1 parent 4318184 commit b2df325

16 files changed

+92
-93
lines changed

source/algorithms.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
the copying version is not included.
138138
For example, \tcode{sort_copy} is not included
139139
because the cost of sorting is much more significant,
140-
and users might as well do \tcode{copy} followed by \tcode{sort}.
140+
and users can invoke \tcode{copy} followed by \tcode{sort}.
141141
\end{footnote}
142142
When such a version is provided for \textit{algorithm} it is called
143143
\textit{algorithm\tcode{_copy}}.
@@ -8587,7 +8587,7 @@
85878587
\pnum
85888588
\begin{example}
85898589
\tcode{ranges::lexicographical_compare(I1, S1, I2, S2, Comp, Proj1, Proj2)}
8590-
could be implemented as:
8590+
can be implemented as:
85918591
\begin{codeblock}
85928592
for ( ; first1 != last1 && first2 != last2 ; ++first1, (void) ++first2) {
85938593
if (invoke(comp, invoke(proj1, *first1), invoke(proj2, *first2))) return true;
@@ -9536,7 +9536,7 @@
95369536
that \tcode{exclusive_scan} excludes the $i^\text{th}$ input element
95379537
from the $i^\text{th}$ sum.
95389538
If \tcode{binary_op} is not mathematically associative,
9539-
the behavior of \tcode{exclusive_scan} might be nondeterministic.
9539+
the behavior of \tcode{exclusive_scan} can be nondeterministic.
95409540
\end{note}
95419541
\end{itemdescr}
95429542

@@ -9663,7 +9663,7 @@
96639663
that \tcode{inclusive_scan} includes the $i^\text{th}$ input element
96649664
in the $i^\text{th}$ sum.
96659665
If \tcode{binary_op} is not mathematically associative,
9666-
the behavior of \tcode{inclusive_scan} might be nondeterministic.
9666+
the behavior of \tcode{inclusive_scan} can be nondeterministic.
96679667
\end{note}
96689668
\end{itemdescr}
96699669

@@ -9738,7 +9738,7 @@
97389738
\tcode{transform_inclusive_scan} is that \tcode{trans\-form\-_\-exclusive_scan}
97399739
excludes the $i^\text{th}$ input element from the $i^\text{th}$ sum.
97409740
If \tcode{binary_op} is not mathematically associative,
9741-
the behavior of \tcode{transform_exclusive_scan} might be nondeterministic.
9741+
the behavior of \tcode{transform_exclusive_scan} can be nondeterministic.
97429742
\tcode{transform_exclusive_scan}
97439743
does not apply \tcode{unary_op} to \tcode{init}.
97449744
\end{note}
@@ -9842,7 +9842,7 @@
98429842
\tcode{transform_inclusive_scan} is that \tcode{trans\-form\-_\-inclusive_scan}
98439843
includes the $i^\text{th}$ input element in the $i^\text{th}$ sum.
98449844
If \tcode{binary_op} is not mathematically associative,
9845-
the behavior of \tcode{transform_inclusive_scan} might be nondeterministic.
9845+
the behavior of \tcode{transform_inclusive_scan} can be nondeterministic.
98469846
\tcode{transform_inclusive_scan} does not
98479847
apply \tcode{unary_op} to \tcode{init}.
98489848
\end{note}

source/atomics.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@
770770
atomic operations applied through any other \tcode{atomic_ref}
771771
referencing the same object.
772772
\begin{note}
773-
Atomic operations or the \tcode{atomic_ref} constructor could acquire
773+
Atomic operations or the \tcode{atomic_ref} constructor can acquire
774774
a shared resource, such as a lock associated with the referenced object,
775775
to enable atomic operations to be applied to the referenced object.
776776
\end{note}
@@ -1608,7 +1608,7 @@
16081608
is \tcode{false}.
16091609
\begin{note}
16101610
Type arguments that are
1611-
not also statically initializable might be difficult to use.
1611+
not also statically initializable can be difficult to use.
16121612
\end{note}
16131613

16141614
\pnum
@@ -1971,7 +1971,7 @@
19711971
\pnum
19721972
\begin{note}
19731973
Under cases where the \tcode{memcpy} and \tcode{memcmp} semantics of the compare-and-exchange
1974-
operations apply, the outcome might be failed comparisons for values that compare equal with
1974+
operations apply, the comparisons can fail for values that compare equal with
19751975
\tcode{operator==} if the value representation has trap bits or alternate
19761976
representations of the same value. Notably, on implementations conforming to
19771977
ISO/IEC/IEEE 60559, floating-point \tcode{-0.0} and \tcode{+0.0}

source/concepts.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@
394394
are modeled, then \tcode{T} and \tcode{U} share a
395395
\term{common reference type}, \tcode{C}.
396396
\begin{note}
397-
\tcode{C} could be the same as \tcode{T}, or \tcode{U}, or it could be a
397+
\tcode{C} can be the same as \tcode{T} or \tcode{U}, or can be a
398398
different type. \tcode{C} can be a reference type.
399399
\end{note}
400400

@@ -437,8 +437,8 @@
437437
\tcode{C}, then \tcode{T} and \tcode{U} share a \term{common type},
438438
\tcode{C}.
439439
\begin{note}
440-
\tcode{C} could be the same as \tcode{T}, or \tcode{U}, or it could be a
441-
different type. \tcode{C} might not be unique.
440+
\tcode{C} can be the same as \tcode{T} or \tcode{U}, or can be a
441+
different type. \tcode{C} is not necessarily unique.
442442
\end{note}
443443

444444
\begin{itemdecl}
@@ -1142,7 +1142,7 @@
11421142
\pnum
11431143
\begin{note}
11441144
The \libconcept{semiregular} concept is modeled by types that behave similarly
1145-
to built-in types like \tcode{int}, except that they might not
1145+
to built-in types like \tcode{int}, except that they need not
11461146
be comparable with \tcode{==}.
11471147
\end{note}
11481148

source/containers.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
container's element type, not for internal types used by the container.
6666
\begin{note}
6767
This
68-
means, for example, that a node-based container might need to construct nodes containing
68+
means, for example, that a node-based container would need to construct nodes containing
6969
aligned buffers and call \tcode{construct} to place the element into the buffer.
7070
\end{note}
7171

source/iostreams.tex

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3696,7 +3696,7 @@
36963696
\tcode{underflow}
36973697
or
36983698
\tcode{uflow}
3699-
might fail by throwing an exception prematurely.
3699+
can fail by throwing an exception prematurely.
37003700
The intention is not only that the calls will not return
37013701
\tcode{eof()}
37023702
but that they will return ``immediately''.
@@ -3927,7 +3927,7 @@
39273927
\tcode{traits::eof()}
39283928
to indicate failure.
39293929
Failure may occur because the input sequence could not be backed up, or if for some
3930-
other reason the pointers could not be set consistent with the constraints.
3930+
other reason the pointers cannot be set consistent with the constraints.
39313931
\tcode{pbackfail()}
39323932
is called only when put back has really failed.
39333933

@@ -7883,7 +7883,7 @@
78837883
\pnum
78847884
\begin{note}
78857885
For efficiency reasons,
7886-
stream buffer operations might violate invariants of \tcode{buf}
7886+
stream buffer operations can violate invariants of \tcode{buf}
78877887
while it is held encapsulated in the \tcode{basic_stringbuf},
78887888
e.g., by writing to characters in the range
78897889
\range{\tcode{buf.data() + buf.size()}}{\tcode{buf.data() + buf.capacity()}}.
@@ -12691,8 +12691,8 @@
1269112691
\effects
1269212692
Appends \tcode{path(x).native()} to the pathname in the native format.
1269312693
\begin{note}
12694-
This directly manipulates the value of \tcode{native()}
12695-
and might not be portable between operating systems.
12694+
This directly manipulates the value of \tcode{native()},
12695+
which is not necessarily portable between operating systems.
1269612696
\end{note}
1269712697

1269812698
\pnum
@@ -13877,7 +13877,7 @@
1387713877
\tcode{file_type} constants
1387813878
to separately identify each of those additional file types \\ \rowsep
1387913879
\tcode{unknown} &
13880-
The file exists but the type could not be determined \\
13880+
The file exists but the type cannot be determined \\
1388113881
\end{floattable}
1388213882

1388313883
\rSec3[fs.enum.copy.opts]{Enum class \tcode{copy_options}}
@@ -14942,7 +14942,7 @@
1494214942
\pnum
1494314943
\begin{note}
1494414944
If the directory structure being iterated over contains cycles
14945-
then the end iterator might be unreachable.
14945+
then it is possible that the end iterator is unreachable.
1494614946
\end{note}
1494714947

1494814948
\rSec3[fs.rec.dir.itr.members]{Members}
@@ -15290,8 +15290,8 @@
1529015290

1529115291
\pnum
1529215292
\begin{note}
15293-
To resolve symlinks,
15294-
or perform other sanitization which might require queries to secondary storage,
15293+
To resolve symlinks
15294+
or perform other sanitization that can involve queries to secondary storage,
1529515295
such as hard disks, consider \tcode{canonical}\iref{fs.op.canonical}.
1529615296
\end{note}
1529715297

@@ -15865,7 +15865,7 @@
1586515865
\pnum
1586615866
\begin{note}
1586715867
The current path as returned by many operating systems is a dangerous
15868-
global variable. It might be changed unexpectedly by third-party or system
15868+
global variable and can be changed unexpectedly by third-party or system
1586915869
library functions, or by another thread.
1587015870
\end{note}
1587115871
\end{itemdescr}
@@ -15892,7 +15892,7 @@
1589215892
\pnum
1589315893
\begin{note}
1589415894
The current path for many operating systems is a dangerous
15895-
global state. It might be changed unexpectedly by a third-party or system
15895+
global state and can be changed unexpectedly by third-party or system
1589615896
library functions, or by another thread.
1589715897
\end{note}
1589815898
\end{itemdescr}
@@ -16380,8 +16380,8 @@
1638016380

1638116381
\pnum
1638216382
\begin{note}
16383-
A postcondition of \tcode{last_write_time(p) == new_time} is not specified since it might not hold for file systems
16384-
with coarse time granularity.
16383+
A postcondition of \tcode{last_write_time(p) == new_time} is not specified
16384+
because it does not necessarily hold for file systems with coarse time granularity.
1638516385
\end{note}
1638616386
\end{itemdescr}
1638716387

source/iterators.tex

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,7 +2079,7 @@
20792079
The only valid use of an \tcode{operator*}
20802080
is on the left side of the assignment statement.
20812081
Assignment through the same value of the iterator happens only once.
2082-
Equality and inequality might not be defined.
2082+
Equality and inequality are not necessarily defined.
20832083
\end{note}
20842084

20852085
\rSec3[forward.iterators]{Forward iterators}
@@ -2637,12 +2637,9 @@
26372637

26382638
\pnum
26392639
\begin{example}
2640-
For a program-defined iterator
2641-
\tcode{BinaryTreeIterator},
2642-
it could be included
2643-
into the bidirectional iterator category by specializing the
2644-
\tcode{iterator_traits}
2645-
template:
2640+
A program-defined iterator \tcode{BinaryTreeIterator}
2641+
can be included into the bidirectional iterator category by
2642+
specializing the \tcode{iterator_traits} template:
26462643

26472644
\begin{codeblock}
26482645
template<class T> struct iterator_traits<BinaryTreeIterator<T>> {

source/lib-intro.tex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,20 +308,20 @@
308308
Failure to meet such a condition results in the function's silent non-viability.
309309
\end{note}
310310
\begin{example}
311-
An implementation might express such a condition
311+
An implementation can express such a condition
312312
via a \grammarterm{constraint-expression}\iref{temp.constr.decl}.
313313
\end{example}
314314

315315
\item
316316
\mandates
317317
the conditions that, if not met, render the program ill-formed.
318318
\begin{example}
319-
An implementation might express such a condition
319+
An implementation can express such a condition
320320
via the \grammarterm{constant-expression}
321321
in a \grammarterm{static_assert-declaration}\iref{dcl.pre}.
322322
If the diagnostic is to be emitted only after the function
323323
has been selected by overload resolution,
324-
an implementation might express such a condition
324+
an implementation can express such a condition
325325
via a \grammarterm{constraint-expression}\iref{temp.constr.decl}
326326
and also define the function as deleted.
327327
\end{example}
@@ -1640,7 +1640,7 @@
16401640
of type \tcode{P} may have an indeterminate value.
16411641
\begin{note}
16421642
Operations involving
1643-
indeterminate values might cause undefined behavior.
1643+
indeterminate values can cause undefined behavior.
16441644
\end{note}
16451645

16461646
\pnum
@@ -2733,7 +2733,7 @@
27332733
(e.g., by calling the function with the argument \tcode{std::move(x)}), the program
27342734
is effectively asking that function to treat that lvalue as a temporary object.
27352735
The implementation
2736-
is free to optimize away aliasing checks which might be needed if the argument was
2736+
is free to optimize away aliasing checks which would possibly be needed if the argument was
27372737
an lvalue.
27382738
\end{note}
27392739
\end{itemize}
@@ -2982,7 +2982,7 @@
29822982
\pnum
29832983
\begin{note}
29842984
This means, for example, that implementations can't use an object with static storage duration for
2985-
internal purposes without synchronization because it could cause a data race even in
2985+
internal purposes without synchronization because doing so can cause a data race even in
29862986
programs that do not explicitly share objects between threads.
29872987
\end{note}
29882988

source/locales.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179

180180
\pnum
181181
\begin{example}
182-
An iostream \tcode{operator<<} might be implemented as:
182+
An iostream \tcode{operator<<} can be implemented as:%
183183
\begin{footnote}
184184
Note that in the call to \tcode{put},
185185
the stream is implicitly converted
@@ -197,7 +197,7 @@
197197
use_facet<time_put<charT, ostreambuf_iterator<charT, traits>>>(
198198
s.getloc()).put(s, s, s.fill(), &tmbuf, 'x').failed();
199199
if (failed)
200-
s.setstate(s.badbit); // might throw
200+
s.setstate(s.badbit); // can throw
201201
}
202202
return s;
203203
}
@@ -2106,7 +2106,7 @@
21062106
\tcode{partial} & not all source characters converted \\
21072107
\tcode{error} &
21082108
encountered a character in \range{from}{from_end}
2109-
that it could not convert \\
2109+
that cannot be converted \\
21102110
\tcode{noconv} &
21112111
\tcode{internT} and \tcode{externT} are the same type, and input
21122112
sequence is identical to converted sequence \\
@@ -3881,7 +3881,7 @@
38813881
\effects
38823882
Reads characters starting at \tcode{s}
38833883
until it has extracted the (perhaps abbreviated) name of a weekday or month.
3884-
If it finds an abbreviation that is followed by characters that could
3884+
If it finds an abbreviation that is followed by characters that can
38853885
match a full name, it continues reading until it matches the full name or
38863886
fails.
38873887
It sets the appropriate

source/numerics.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4011,7 +4011,7 @@
40114011
\throws
40124012
A value of an \impldef{exception type when \tcode{random_device} constructor fails} type
40134013
derived from \tcode{exception}
4014-
if the \tcode{random_device} could not be initialized.
4014+
if the \tcode{random_device} cannot be initialized.
40154015

40164016
\pnum
40174017
\remarks
@@ -4068,7 +4068,7 @@
40684068
\throws
40694069
A value of an \impldef{exception type when \tcode{random_device::operator()} fails}
40704070
type derived from \tcode{exception}
4071-
if a random number could not be obtained.
4071+
if a random number cannot be obtained.
40724072
\end{itemdescr}
40734073

40744074

source/ranges.tex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,8 +1016,9 @@
10161016
algorithms and making multiple passes over the range by repeated calls to
10171017
\tcode{ranges::begin} and \tcode{ranges::end}.
10181018
Since \tcode{ranges::begin} is not required to be equality-preserving
1019-
when the return type does not model \libconcept{forward_iterator}, repeated calls
1020-
might not return equal values or might not be well-defined.
1019+
when the return type does not model \libconcept{forward_iterator},
1020+
it is possible for repeated calls
1021+
to not return equal values or to not be well-defined.
10211022
\end{note}
10221023
\end{itemdescr}
10231024

@@ -1104,7 +1105,7 @@
11041105
\begin{note}
11051106
\tcode{ranges::size(t)} is otherwise not required to be
11061107
well-defined after evaluating \tcode{ranges::begin(t)}.
1107-
For example, \tcode{ranges::size(t)} might be well-defined
1108+
For example, it is possible for \tcode{ranges::size(t)} to be well-defined
11081109
for a \libconcept{sized_range} whose iterator type
11091110
does not model \libconcept{forward_iterator}
11101111
only if evaluated before the first call to \tcode{ranges::begin(t)}.
@@ -1844,7 +1845,7 @@
18441845
\end{codeblock}
18451846
The call to \tcode{ranges::find} at \#1 returns \tcode{ranges::dangling}
18461847
since \tcode{f()} is an rvalue \tcode{vector};
1847-
the \tcode{vector} could potentially be destroyed
1848+
it is possible for the \tcode{vector} to be destroyed
18481849
before a returned iterator is dereferenced.
18491850
However, the calls at \#2 and \#3 both return iterators
18501851
since the lvalue \tcode{vec} and specializations of \tcode{subrange}

0 commit comments

Comments
 (0)