Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[std] Rephrase notes containing 'must' #6737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
Loading
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
another function invocation is specified to synchronize with it,
and if it is not a memory allocation or deallocation function.
\begin{note}
Implementations must ensure that internal synchronization
Implementations are expected to ensure that internal synchronization
inside standard library functions does not prevent forward progress
when those functions are executed by threads of execution
with weakly parallel forward progress guarantees.
Expand Down
16 changes: 8 additions & 8 deletions 16 source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@
\end{example}
\begin{note}
The rules for declarations and expressions
describe in which contexts complete class types are required. A class
type \tcode{T} must be complete if:
describe in which contexts complete class types are required.
The program is ill-formed unless a class type \tcode{T} is complete if:
\begin{itemize}
\item an object of type \tcode{T} is defined\iref{basic.def}, or
\item a non-static class data member of type \tcode{T} is
Expand Down Expand Up @@ -1220,7 +1220,7 @@
The locus of a \grammarterm{concept-definition}
is immediately after its \grammarterm{concept-name}\iref{temp.concept}.
\begin{note}
The \grammarterm{constraint-expression} cannot use
It is not possible for the \grammarterm{constraint-expression} to use
the \grammarterm{concept-name}.
\end{note}

Expand Down Expand Up @@ -1324,7 +1324,7 @@
A \grammarterm{parameter-declaration-clause} $P$ introduces
a \defnadj{function parameter}{scope} that includes $P$.
\begin{note}
A function parameter cannot be used for its value
It is not possible for a function parameter to be used for its value
within the \grammarterm{parameter-declaration-clause}\iref{dcl.fct.default}.
\end{note}
\begin{itemize}
Expand Down Expand Up @@ -4207,10 +4207,10 @@
struct D : virtual B { char c; };
\end{codeblock}

When \tcode{D} is the type of a complete object, it will have a subobject of
type \tcode{B}, so it must be aligned appropriately for a \tcode{\keyword{long} \keyword{double}}.
When \tcode{D} is the type of a complete object, it has a subobject of
type \tcode{B}, so it is aligned appropriately for a \tcode{\keyword{long} \keyword{double}}.
If \tcode{D} appears as a subobject of another object that also has \tcode{B}
as a virtual base class, the \tcode{B} subobject might be part of a different
as a virtual base class, the \tcode{B} subobject can be part of a different
subobject, reducing the alignment requirements on the \tcode{D} subobject.
\end{example}
The result of the \keyword{alignof} operator reflects the alignment
Expand Down Expand Up @@ -6368,7 +6368,7 @@
\begin{note}
The value observed by a load of an atomic depends on the ``happens
before'' relation, which depends on the values observed by loads of atomics.
The intended reading is that there must exist an
The intended reading is that there exists an
association of atomic loads with modifications they observe that, together with
suitably chosen modification orders and the ``happens before'' relation derived
as described above, satisfy the resulting constraints as imposed here.
Expand Down
29 changes: 16 additions & 13 deletions 29 source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,10 @@
class A * A;
\end{codeblock}
first specifies \tcode{A} to be the name of a class and then redefines
it as the name of a pointer to an object of that class. This means that
the elaborated form \keyword{class} \tcode{A} must be used to refer to the
class. Such artistry with names can be confusing and is best avoided.
it as the name of a pointer to an object of that class.
This means references to the class are ill-formed
unless the elaborated form \keyword{class} \tcode{A} is used.
Such artistry with names can be confusing and is best avoided.
\end{note}

\pnum
Expand Down Expand Up @@ -2226,7 +2227,7 @@
\end{codeblock}
\end{example}
\begin{note}
An explicit destructor call must always be written using
An explicit destructor call is always written using
a member access operator\iref{expr.ref} or a \grammarterm{qualified-id}\iref{expr.prim.id.qual};
in particular, the
\grammarterm{unary-expression}
Expand Down Expand Up @@ -3106,9 +3107,10 @@
default constructor\iref{class.default.ctor},
copy constructor, move constructor\iref{class.copy.ctor},
copy assignment operator, move assignment operator\iref{class.copy.assign},
or destructor\iref{class.dtor}, the corresponding member function
of the union must be user-provided or it will
be implicitly deleted\iref{dcl.fct.def.delete} for the union.
or destructor\iref{class.dtor},
the corresponding member function of the union
will be implicitly deleted\iref{dcl.fct.def.delete}
unless it is user-provided.
\begin{example}
Consider the following union:
\begin{codeblock}
Expand All @@ -3122,8 +3124,8 @@
member functions, \tcode{U} will have an implicitly deleted default constructor,
copy/move constructor,
copy/move assignment operator, and destructor.
To use \tcode{U}, some or all of these member functions
must be user-provided.
A use \tcode{U} is ill-formed
unless some or all of these member functions are user-provided.
\end{example}
\end{note}

Expand Down Expand Up @@ -4158,8 +4160,9 @@
void draw(); // a definition is required somewhere
};
\end{codeblock}
would make class \tcode{circle} non-abstract and a definition of
\tcode{circle::draw()} must be provided.
would make class \tcode{circle} non-abstract;
the program is ill-formed, no diagnostic required,
unless a definition of \tcode{circle::draw()} is provided\iref{basic.def.odr}.
\end{example}

\pnum
Expand Down Expand Up @@ -4348,14 +4351,14 @@
\tcode{A}.
This implies, for example, that access checking on the first use of
\tcode{A::I}
must be deferred until it is determined that this use of
is deferred until it is determined that this use of
\tcode{A::I}
is as the return type of a member of class
\tcode{A}.
Similarly, the use of \tcode{A::B} as a
\grammarterm{base-specifier} is well-formed because \tcode{D}
is derived from \tcode{A}, so checking of \grammarterm{base-specifier}{s}
must be deferred until the entire \grammarterm{base-specifier-list} has been seen.
is deferred until the entire \grammarterm{base-specifier-list} has been seen.
\end{example}

\pnum
Expand Down
34 changes: 18 additions & 16 deletions 34 source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2508,8 +2508,8 @@
Semantic transformation.
In \Cpp{}, the initializer for one of a set of
mutually-referential file-local objects with static storage
duration must invoke a function
call to achieve the initialization.
duration is expected to invoke a function
to achieve the initialization.
\howwide
Seldom.

Expand Down Expand Up @@ -2708,7 +2708,7 @@
\tcode{sizeof(char*)}
in C.
\difficulty
Programs must add explicit casts to the appropriate rvalue.
Programs need to add explicit casts to the appropriate rvalue.
\howwide
Rare.

Expand Down Expand Up @@ -2744,7 +2744,7 @@
return-value mechanisms for the return of class objects.
If
some flow paths execute a return without specifying any value,
the implementation must embody many more complications.
the implementation gets more complicated.
Besides,
promising to return a value of a given type, and then not returning
such a value, has always been recognized to be a questionable
Expand Down Expand Up @@ -2803,7 +2803,7 @@

\diffref{dcl.typedef}
\change
A \Cpp{} \grammarterm{typedef-name} must be different from any class type name declared
A \Cpp{} \grammarterm{typedef-name} needs to be different from any class type name declared
in the same scope (except if the typedef is a synonym of the class name with the
same name). In C, a \grammarterm{typedef-name} and a struct tag name declared in the same scope
can have the same name (because they have different name spaces).
Expand Down Expand Up @@ -2836,9 +2836,9 @@

\diffref{dcl.type} [see also \ref{basic.link}]
\change
Const objects must be initialized in \Cpp{} but can be left uninitialized in C.
Const objects need to be initialized in \Cpp{} but can be left uninitialized in C.
\rationale
A const object cannot be assigned to so it must be initialized
A const object cannot be assigned to so it needs to be initialized
to hold a useful value.
\effect
Deletion of semantically well-defined feature.
Expand Down Expand Up @@ -2888,8 +2888,8 @@
This feature was marked as ``obsolescent'' in C.
\difficulty
Syntactic transformation.
The function declarations using C incomplete declaration style must
be completed to become full prototype declarations.
The function declarations using C incomplete declaration style
need to be completed to become full prototype declarations.
A program may need to be updated further if different calls to the
same (non-prototype) function have different numbers of arguments or
if the type of corresponding arguments differed.
Expand Down Expand Up @@ -2917,7 +2917,7 @@
Deletion of semantically well-defined feature.
\difficulty
Semantic transformation.
The type definitions must be moved to file scope, or in header files.
The type definitions need to be moved to file scope, or in header files.
\howwide
Seldom.
This style of type definition is seen as poor coding style.
Expand All @@ -2941,7 +2941,7 @@
compared to the corresponding functionality in C\@.
In \Cpp{},
designators for non-static data members
must be specified in declaration order,
need to be specified in declaration order,
designators for array elements and nested designators
are not supported,
and
Expand All @@ -2960,7 +2960,7 @@
\rationale
In \Cpp{}, members are destroyed in reverse construction order
and the elements of an initializer list are evaluated in lexical order,
so member initializers must be specified in order.
so member initializers need to be specified in order.
Array designators conflict with \grammarterm{lambda-expression} syntax.
Nested designators are seldom used.
\effect
Expand All @@ -2973,8 +2973,10 @@

\diffref{dcl.init.string}
\change
In \Cpp{}, when initializing an array of character with a string, the number of
characters in the string (including the terminating \tcode{'\textbackslash 0'}) must not exceed the
In \Cpp{}, when initializing an array of character with a string,
it is not possible for the number of
characters in the string (including the terminating \tcode{'\textbackslash 0'})
to exceed the
number of elements in the array. In C, an array can be initialized with a string even if
the array is not large enough to contain the string-terminating \tcode{'\textbackslash 0'}.

Expand All @@ -2989,7 +2991,7 @@
Deletion of semantically well-defined feature.
\difficulty
Semantic transformation.
The arrays must be declared one element bigger to contain the
The arrays need to be declared one element bigger to contain the
string terminating \tcode{'\textbackslash 0'}.
\howwide
Seldom.
Expand Down Expand Up @@ -3141,7 +3143,7 @@
\difficulty
Semantic transformation.
If volatile semantics are required for the copy,
a user-declared constructor or assignment must
a user-declared constructor or assignment needs to
be provided.
If non-volatile semantics are required,
an explicit
Expand Down
5 changes: 3 additions & 2 deletions 5 source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,9 @@
All other constructors for these container types take a
\tcode{const allocator_type\&} argument.
\begin{note}
If an invocation of a constructor uses the default value of an optional
allocator argument, then the allocator type must support value-initialization.
Invocation of a constructor that uses the default value of an optional
allocator argument is ill-formed
unless the allocator type supports value-initialization.
\end{note}
A copy of this allocator is used for any memory allocation and element construction
performed, by these constructors and by all member functions,
Expand Down
24 changes: 12 additions & 12 deletions 24 source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@

void g(char c) {
f(0); // OK
f(c); // error on implementations where \tcode{sizeof(int) > 1}: must be \tcode{int}-sized
f(c); // error on implementations where \tcode{sizeof(int) > 1}: \tcode{must be int-sized}
}
\end{codeblock}
\end{example}
Expand Down Expand Up @@ -823,7 +823,7 @@
with respect to the \keyword{constexpr} or \keyword{consteval} specifier.
\end{note}
\begin{note}
Function parameters cannot be declared \keyword{constexpr}.
It is not possible for a function parameter to be declared \keyword{constexpr}.
\end{note}
\begin{example}
\begin{codeblock}
Expand Down Expand Up @@ -1196,10 +1196,11 @@
\pnum
\begin{note}
Declaring a variable \keyword{const} can affect its linkage\iref{dcl.stc}
and its usability in constant expressions\iref{expr.const}. As
described in~\ref{dcl.init}, the definition of an object or subobject
of const-qualified type must specify an initializer or be subject to
default-initialization.
and its usability in constant expressions\iref{expr.const}.
As described in~\ref{dcl.init},
the definition of an object or subobject of const-qualified type is ill-formed
unless the definition specifies an initializer or
be subject to default-initialization.
\end{note}

\pnum
Expand Down Expand Up @@ -3595,10 +3596,9 @@
printf("a=%d b=%d", a, b);
\end{codeblock}

However, the first argument must be of a type
that can be converted to a
\keyword{const}
\tcode{char*}.
However, the program is ill-formed
unless the first argument is of a type
that can be converted to a \keyword{const} \tcode{char*}.
\end{example}
\begin{note}
The standard header \libheaderref{cstdarg}
Expand Down Expand Up @@ -4963,7 +4963,7 @@
are the first $n$ elements of the aggregate,
where $n$ is the number of elements in the initializer list.
\item
Otherwise, the initializer list must be \tcode{\{\}},
Otherwise, the initializer list is \tcode{\{\}},
and there are no explicitly initialized elements.
\end{itemize}

Expand Down Expand Up @@ -7995,7 +7995,7 @@
\pnum
\begin{note}
Since destructors do not have names, a
\grammarterm{using-declaration} cannot refer to a
\grammarterm{using-declaration} is not able to refer to a
destructor for a base class.
\end{note}
If a constructor or assignment operator brought from a base class into a derived class
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.