Skip to content

Commit

Permalink
[std] Replace 'might' in normative context.
Browse files Browse the repository at this point in the history
Partially addresses ISO/CS 017 (C++20 DIS)
  • Loading branch information
jensmaurer authored and zygoloid committed Sep 21, 2020
1 parent 9fd8ca5 commit 64b5913
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 26 deletions.
2 changes: 1 addition & 1 deletion source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
\tcode{BinaryOperation1},
\tcode{BinaryOperation2}, and
the operators used by the analogous overloads to these parallel algorithms
that could be formed by the invocation
that are formed by an invocation
with the specified default predicate or operation (where applicable)
shall not directly or indirectly modify objects via their arguments,
nor shall they rely on the identity of the provided objects.
Expand Down
16 changes: 7 additions & 9 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2635,7 +2635,7 @@

\pnum
\indextext{translation unit}%
A name is said to have \defn{linkage} when it might denote the same
A name is said to have \defn{linkage} when it can denote the same
object, reference, function, type, template, namespace or value as a
name introduced by a declaration in another scope:
\begin{itemize}
Expand Down Expand Up @@ -4211,7 +4211,7 @@
less than or equal to the greatest alignment supported by the implementation in
all contexts, which is equal to
\tcode{alignof(std::max_align_t)}\iref{support.types}.
The alignment required for a type might be different when it is used as the type
The alignment required for a type may be different when it is used as the type
of a complete object and when it is used as the type of a subobject.
\begin{example}
\begin{codeblock}
Expand Down Expand Up @@ -4750,14 +4750,14 @@
incomplete type.

\pnum
A class type (such as ``\tcode{class X}'') might be incomplete at one
A class type (such as ``\tcode{class X}'') can be incomplete at one
point in a translation unit and complete later on; the type
``\tcode{class X}'' is the same type at both points. The declared type
of an array object might be an array of incomplete class type and
of an array object can be an array of incomplete class type and
therefore incomplete; if the class type is completed later on in the
translation unit, the array type becomes complete; the array type at
those two points is the same type. The declared type of an array object
might be an array of unknown bound and therefore be incomplete at one
can be an array of unknown bound and therefore be incomplete at one
point in a translation unit and complete later on; the array types at
those two points (``array of unknown bound of \tcode{T}'' and ``array of
\tcode{N} \tcode{T}'') are different types. The type of a pointer to array of
Expand Down Expand Up @@ -5746,7 +5746,7 @@
\end{example}
The sequencing constraints on the execution of the called function (as
described above) are features of the function calls as evaluated,
whatever the syntax of the expression that calls the function might be.%
regardless of the syntax of the expression that calls the function.%
\indextext{value computation|)}%

\indextext{behavior!on receipt of signal}%
Expand Down Expand Up @@ -6414,9 +6414,7 @@
A program shall contain a global function called \tcode{main}
attached to the global module.
Executing a program starts a main thread of execution~(\ref{intro.multithread}, \ref{thread.threads})
in which the \tcode{main} function is invoked,
and in which variables of static storage duration
might be initialized\iref{basic.start.static} and destroyed\iref{basic.start.term}.
in which the \tcode{main} function is invoked.
\indextext{implementation!freestanding}%
It is \impldef{defining \tcode{main} in freestanding environment}
whether a program in a freestanding environment is required to define a \tcode{main}
Expand Down
7 changes: 6 additions & 1 deletion source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2301,11 +2301,13 @@
derived classes.
Bases and members are destroyed in the reverse order of the completion of
their constructor (see~\ref{class.base.init}).
\begin{note}
A
\tcode{return}
statement\iref{stmt.return} in a destructor might not directly return to the
caller; before transferring control to the caller, the destructors for the
members and bases are called.
\end{note}
\indextext{order of execution!destructor and array}%
Destructors for elements of an array are called in reverse order of their
construction (see~\ref{class.init}).
Expand Down Expand Up @@ -6594,7 +6596,8 @@
a variable of automatic storage duration
that is either a non-volatile object or
an rvalue reference to a non-volatile object type.
In the following copy-initialization contexts, a move operation might be used instead of a copy operation:
In the following copy-initialization contexts,
a move operation is first considered before attempting a copy operation:
\begin{itemize}
\item If the \grammarterm{expression} in a \tcode{return}\iref{stmt.return} or
\tcode{co_return}\iref{stmt.return.coroutine} statement
Expand Down Expand Up @@ -7203,8 +7206,10 @@

\pnum
Access to the deallocation function is checked statically.
\begin{note}
Hence, even though a different one might actually be executed,
the statically visible deallocation function is required to be accessible.
\end{note}
\begin{example}
For the call on line ``// 1'' above,
if
Expand Down
5 changes: 2 additions & 3 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,7 @@
\tcode{array} is provided as a sequence container which provides limited sequence operations
because it has a fixed number of elements. The library also provides container adaptors that
make it easy to construct abstract data types, such as \tcode{stack}s or \tcode{queue}s, out of
the basic sequence container kinds (or out of other kinds of sequence containers that the user
might define).
the basic sequence container kinds (or out of other kinds of sequence containers that the user defines).

\pnum
\begin{note}
Expand Down Expand Up @@ -2873,7 +2872,7 @@
\indexunordmem{max_bucket_count}%
\tcode{b.max_bucket_count()}
& \tcode{size_type}
& \returns An upper bound on the number of buckets that \tcode{b} might
& \returns An upper bound on the number of buckets that \tcode{b} can
ever contain.%
& Constant
\\ \rowsep
Expand Down
2 changes: 1 addition & 1 deletion source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6085,7 +6085,7 @@
shall provide implicit definitions
for them~(\ref{class.ctor},
\ref{class.dtor}, \ref{class.copy.ctor}, \ref{class.copy.assign}),
which might mean defining them as deleted.
including possibly defining them as deleted.
A defaulted prospective destructor\iref{class.dtor}
that is not a destructor is defined as deleted.
A defaulted special member function
Expand Down
6 changes: 3 additions & 3 deletions source/iostreams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6138,7 +6138,7 @@
to generate the requested output.
If the generation fails, then the formatted output function does
\tcode{setstate(ios_base::failbit)},
which might throw an exception.
which can throw an exception.
If an exception is thrown during output, then
\tcode{ios_base::badbit}
is turned on\footnote{without causing an
Expand Down Expand Up @@ -9620,8 +9620,8 @@
\pnum
\remarks
An
implementation might well provide an overriding definition for this function
signature if it can determine that more characters can be read from the input
implementation may provide an overriding definition for this function
signature if it can determine whether more characters can be read from the input
sequence.
\end{itemdescr}

Expand Down
4 changes: 2 additions & 2 deletions source/overloading.tex
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@
which the
\grammarterm{postfix-expression}
ultimately contains a name that
denotes one or more functions that might be called.
denotes one or more functions.
Such a
\grammarterm{postfix-expression},
perhaps nested arbitrarily deep in
Expand Down Expand Up @@ -985,7 +985,7 @@

\pnum
If either operand has a type that is a class or an enumeration, a
user-defined operator function might be declared that implements
user-defined operator function can be declared that implements
this operator or a user-defined conversion can be necessary to
convert the operand to a type that is appropriate for a built-in
operator.
Expand Down
2 changes: 1 addition & 1 deletion source/preprocessor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,7 @@
\end{ncsimplebnf}
causes the implementation to behave
in an \impldef{\tcode{\#pragma}} manner.
The behavior might cause translation to fail or cause the translator or
The behavior may cause translation to fail or cause the translator or
the resulting program to behave in a non-conforming manner.
Any pragma that is not recognized by the implementation is ignored.

Expand Down
2 changes: 1 addition & 1 deletion source/templates.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3891,7 +3891,7 @@
\indextext{overloading!resolution!template}%
\indextext{ordering!function template partial|see{template, function, partial ordering}}%
If a function template is overloaded,
the use of a function template specialization might be ambiguous because
the use of a function template specialization can be ambiguous because
template argument deduction\iref{temp.deduct} may associate the function
template specialization with more than one function template declaration.
\defnx{Partial ordering}{template!function!partial ordering}
Expand Down
2 changes: 1 addition & 1 deletion source/time.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@
\pnum
The \tcode{duration} template uses the \tcode{duration_values} trait to
construct special values of the duration's representation (\tcode{Rep}). This is
done because the representation might be a class type with behavior which
done because the representation can be a class type with behavior that
requires some other implementation to return these special values. In that case,
the author of that class type should specialize \tcode{duration_values} to
return the indicated values.
Expand Down
6 changes: 3 additions & 3 deletions source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4584,7 +4584,7 @@
\tcode{t} are as defined by the exception safety guarantee of the assignment
expression; \tcode{valueless_by_exception()} will be \tcode{false}.
\item If an exception is thrown during the initialization of the contained value,
the \tcode{variant} object might not hold a value.
the \tcode{variant} object is permitted to not hold a value.
\end{itemize}
\end{itemdescr}

Expand Down Expand Up @@ -4668,7 +4668,7 @@
\pnum
\remarks
If an exception is thrown during the initialization of the contained value,
the \tcode{variant} might not hold a value.
the \tcode{variant} is permitted to not hold a value.
\end{itemdescr}

\indexlibrarymember{emplace}{variant}%
Expand Down Expand Up @@ -4709,7 +4709,7 @@
\pnum
\remarks
If an exception is thrown during the initialization of the contained value,
the \tcode{variant} might not hold a value.
the \tcode{variant} is permitted to not hold a value.
\end{itemdescr}

\rSec3[variant.status]{Value status}
Expand Down

0 comments on commit 64b5913

Please sign in to comment.