Skip to content

s/(possibly cv-qualified)/\\cv{}~/ and allied changes. #1142

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

Merged
merged 1 commit into from
Dec 14, 2016
Merged
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
43 changes: 21 additions & 22 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
type \tcode{T} (Clause~\ref{conv}, \ref{expr.type.conv},
\ref{expr.dynamic.cast}, \ref{expr.static.cast}, \ref{expr.cast}), or
\item an expression that is not a null pointer constant, and has type
other than \cv{} \tcode{void*}, is converted to the type pointer to \tcode{T}
other than \cv{}~\tcode{void*}, is converted to the type pointer to \tcode{T}
or reference to \tcode{T} using a standard conversion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general (not a comment on this change), instead of "cv void *", I'd like to see phrasing such as "pointer to cv void" (in double quotes). The latter is the "official" type language introduced in 8.3, and we should use it, in particular when we do not-quite-C++ things such as \cv with it.

(Clause~\ref{conv}), a \tcode{dynamic_cast}~(\ref{expr.dynamic.cast}) or
a \tcode{static_cast}~(\ref{expr.static.cast}), or
Expand Down Expand Up @@ -2101,8 +2101,7 @@
\grammarterm{postfix-expression}. If the type \tcode{T} of the object
expression is of a class type \tcode{C}, the \grammarterm{type-name} is
also looked up in the scope of class \tcode{C}. At least one of the
lookups shall find a name that refers to (possibly cv-qualified)
\tcode{T}. \begin{example}
lookups shall find a name that refers to \cv{}~\tcode{T}. \begin{example}

\begin{codeblock}
struct A { };
Expand Down Expand Up @@ -3290,9 +3289,9 @@
\item
the pointer is used as the operand of a
\tcode{static_cast}~(\ref{expr.static.cast}), except when the conversion
is to pointer to \cv{} \tcode{void}, or to pointer to \cv{}
\tcode{void} and subsequently to pointer to either \cv{}
\tcode{char} or \cv{} \tcode{unsigned char}, or
is to pointer to \cv{}~\tcode{void}, or to pointer to \cv{}~\tcode{void}
and subsequently to pointer to either \cv{}~\tcode{char}
or \cv{}~\tcode{unsigned char}, or
\item
the pointer is used as the operand of a
\tcode{dynamic_cast}~(\ref{expr.dynamic.cast}).
Expand Down Expand Up @@ -3538,7 +3537,7 @@
\defnx{incompletely-defined object type}{object type!incompletely-defined}.%
\footnote{The size and layout of an instance of an incompletely-defined
object type is unknown.}
Incompletely-defined object types and \cv{} \tcode{void} are
Incompletely-defined object types and \cv{}~\tcode{void} are
\defnx{incomplete types}{type!incomplete}~(\ref{basic.fundamental}).
Objects shall not be defined to have an
incomplete type.
Expand Down Expand Up @@ -3593,7 +3592,7 @@
\pnum
\indextext{object type}%
An \defn{object type} is a (possibly cv-qualified) type that is not
a function type, not a reference type, and not \cv{} \tcode{void}.
a function type, not a reference type, and not \cv{}~\tcode{void}.

\pnum
Arithmetic types~(\ref{basic.fundamental}), enumeration types, pointer
Expand Down Expand Up @@ -3862,19 +3861,19 @@

\pnum
\indextext{type!\idxcode{void}}%
A type \cv{} \tcode{void}
A type \cv{}~\tcode{void}
is an incomplete type that cannot be completed; such a type has
an empty set of values. It is used as the return
type for functions that do not return a value. Any expression can be
explicitly converted to type \cv{} \tcode{void}~(\ref{expr.cast}).
An expression of type \cv{} \tcode{void} shall
explicitly converted to type \cv{}~\tcode{void}~(\ref{expr.cast}).
An expression of type \cv{}~\tcode{void} shall
be used only as an expression statement~(\ref{stmt.expr}), as an operand
of a comma expression~(\ref{expr.comma}), as a second or third operand
of \tcode{?:}~(\ref{expr.cond}), as the operand of
\tcode{typeid}, \tcode{noexcept}, or \tcode{decltype}, as
the expression in a return statement~(\ref{stmt.return}) for a function
with the return type \cv{} \tcode{void}, or as the operand of an explicit conversion
to type \cv{} \tcode{void}.
with the return type \cv{}~\tcode{void}, or as the operand of an explicit conversion
to type \cv{}~\tcode{void}.

\pnum
A value of type \tcode{std::nullptr_t} is a null pointer
Expand All @@ -3899,7 +3898,7 @@
\item \defnx{functions}{type!function}, which have parameters of given types and return
\tcode{void} or references or objects of a given type,~\ref{dcl.fct};

\item \defnx{pointers}{type!pointer} to \cv{} \tcode{void} or objects or functions (including
\item \defnx{pointers}{type!pointer} to \cv{}~\tcode{void} or objects or functions (including
static members of classes) of a given type,~\ref{dcl.ptr};

\item %
Expand Down Expand Up @@ -3944,7 +3943,7 @@

\pnum
\indextext{terminology!pointer}%
The type of a pointer to \cv{} \tcode{void} or a pointer to an object type is
The type of a pointer to \cv{}~\tcode{void} or a pointer to an object type is
called an \defn{object pointer type}. \begin{note} A pointer to \tcode{void}
does not have a pointer-to-object type, however, because \tcode{void} is not
an object type. \end{note} The type of a pointer that can designate a function
Expand Down Expand Up @@ -4039,9 +4038,9 @@
\tcode{void}
can be used to point to objects of
unknown type. Such a pointer shall be able to hold any object pointer.
An object of type \cv{}
\tcode{void*} shall have the same representation and alignment
requirements as \cv{} \tcode{char*}.
An object of type \cv{}~\tcode{void*}
shall have the same representation and alignment
requirements as \cv{}~\tcode{char*}.

\rSec2[basic.type.qualifier]{CV-qualifiers}

Expand Down Expand Up @@ -4115,7 +4114,7 @@
represents an arbitrary set of cv-qualifiers, i.e., one of
\{\tcode{const}\}, \{\tcode{volatile}\}, \{\tcode{const},
\tcode{volatile}\}, or the empty set.
For a type \cv{} \tcode{T}, the \defnx{top-level cv-qualifiers}{cv-qualifier!top-level}
For a type \cv{}~\tcode{T}, the \defnx{top-level cv-qualifiers}{cv-qualifier!top-level}
of that type are those denoted by \cv.
\begin{example}
The type corresponding to the \grammarterm{type-id}
Expand All @@ -4133,7 +4132,7 @@
\pnum
Cv-qualifiers applied to an array
type attach to the underlying element type, so the notation
``\cv{} \tcode{T}'', where \tcode{T} is an array type, refers to
``\cv{}~\tcode{T}'', where \tcode{T} is an array type, refers to
an array whose elements are so-qualified. An array type whose elements
are cv-qualified is also considered to have the same cv-qualifications
as its elements.%
Expand Down Expand Up @@ -4201,7 +4200,7 @@
is the object initialized by the prvalue;
a prvalue
that is used to compute the value of an operand of an operator or
that has type (possibly cv-qualified) \tcode{void}
that has type \cv{}~\tcode{void}
has no result object.
\begin{note}
Except when the prvalue is the operand of a \grammarterm{decltype-specifier},
Expand Down Expand Up @@ -4237,7 +4236,7 @@
\pnum
Unless otherwise indicated~(\ref{expr.call}),
a prvalue shall always have complete type or the \tcode{void} type.
A glvalue shall not have type \cv{} \tcode{void}.
A glvalue shall not have type \cv{}~\tcode{void}.
\begin{note}
A glvalue may have complete or incomplete non-\tcode{void} type.
Class and array prvalues can have cv-qualified types; other prvalues
Expand Down
2 changes: 1 addition & 1 deletion source/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@
The declaration of a non-inline
static data member in its class definition
is not a definition and may be of an incomplete type other than
\cv{} \tcode{void}. The definition for a static data
\cv{}~\tcode{void}. The definition for a static data
member that is not defined inline in the class definition
shall appear in a namespace scope enclosing the member's class
definition.
Expand Down
2 changes: 1 addition & 1 deletion source/conversions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@

\begin{itemize}

\item If \tcode{T} is (possibly cv-qualified) \tcode{std::nullptr_t}, the result is a
\item If \tcode{T} is \cv{}~\tcode{std::nullptr_t}, the result is a
null pointer constant~(\ref{conv.ptr}).
\begin{note}
Since no value is fetched from memory,
Expand Down
2 changes: 1 addition & 1 deletion source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@
In the case of a \tcode{return} statement with no operand
or with an operand of type \tcode{void},
\tcode{T} shall be either
\tcode{decltype(auto)} or \cv{} \tcode{auto}.
\tcode{decltype(auto)} or \cv{}~\tcode{auto}.

\pnum
If the deduction is for a \tcode{return} statement
Expand Down
20 changes: 9 additions & 11 deletions source/declarators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@
\end{note}
\indextext{\idxcode{void\&}}%
A declarator that specifies the type
``reference to \cv{} \tcode{void}''
``reference to \cv{}~\tcode{void}''
is ill-formed.


Expand Down Expand Up @@ -794,9 +794,9 @@
\indextext{reference collapsing}%
If a \grammarterm{typedef-name}~(\ref{dcl.typedef}, \ref{temp.param})
or a \grammarterm{decltype-specifier}~(\ref{dcl.type.simple}) denotes a type \tcode{TR} that
is a reference to a type \tcode{T}, an attempt to create the type ``lvalue reference to \cv{}
\tcode{TR}'' creates the type ``lvalue reference to \tcode{T}'', while an attempt to create
the type ``rvalue reference to \cv{} \tcode{TR}'' creates the type \tcode{TR}.
is a reference to a type \tcode{T}, an attempt to create the type ``lvalue reference to \cv{}~\tcode{TR}''
creates the type ``lvalue reference to \tcode{T}'', while an attempt to create
the type ``rvalue reference to \cv{}~\tcode{TR}'' creates the type \tcode{TR}.
\begin{note} This rule is known as reference collapsing. \end{note}
\begin{example}

Expand Down Expand Up @@ -922,8 +922,7 @@
of a class (\ref{class.static}),
a member with reference type,
or
``\cv{}
\tcode{void}''.
``\cv{}~\tcode{void}''.

\begin{note}
See also~\ref{expr.unary} and~\ref{expr.mptr.oper}.
Expand Down Expand Up @@ -962,8 +961,7 @@
\tcode{T}
is called the array
\term{element type};
this type shall not be a reference type, the (possibly cv-qualified) type
\tcode{void},
this type shall not be a reference type, \cv{}~\tcode{void},
a function type or an abstract class type.
\indextext{declaration!array}%
If the
Expand Down Expand Up @@ -2309,7 +2307,7 @@
variable with a unique name \tcode{e} is introduced. If the
\grammarterm{assignment-expression} in the \grammarterm{initializer}
has array type \tcode{A} and no \grammarterm{ref-qualifier} is present, \tcode{e}
has type \cv{} \tcode{A} and each element is copy-initialized or direct-initialized
has type \cv{}~\tcode{A} and each element is copy-initialized or direct-initialized
from the corresponding element of the \grammarterm{assignment-expression} as specified
by the form of the \grammarterm{initializer}.
Otherwise, \tcode{e}
Expand Down Expand Up @@ -2381,8 +2379,8 @@
(in declaration order),
each \tcode{v}$_i$ is the
name of an lvalue that refers to the member \tcode{m}$_i$ of \tcode{e} and
whose type is \cv{} \tcode{T}$_i$, where \tcode{T}$_i$ is the declared type of
that member; the referenced type is \cv{} \tcode{T}$_i$. The lvalue is a
whose type is \cv{}~\tcode{T}$_i$, where \tcode{T}$_i$ is the declared type of
that member; the referenced type is \cv{}~\tcode{T}$_i$. The lvalue is a
bit-field if that member is a bit-field.
\begin{example}
\begin{codeblock}
Expand Down
17 changes: 8 additions & 9 deletions source/exceptions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@
\term{handler}~(\ref{except.handle}).
If the type of the exception object would
be an incomplete type or a pointer to an incomplete
type other than (possibly cv-qualified)
\tcode{void} the program is ill-formed.
type other than \cv{}~\tcode{void} the program is ill-formed.

\pnum
\indextext{exception handling!memory}%
Expand Down Expand Up @@ -491,16 +490,16 @@
if
\begin{itemize}
\item%
The \term{handler} is of type \cv{} \tcode{T} or
\cv{} \tcode{T\&} and
The \term{handler} is of type \cv{}~\tcode{T} or
\cv{}~\tcode{T\&} and
\tcode{E} and \tcode{T}
are the same type (ignoring the top-level \grammarterm{cv-qualifiers}), or
\item%
the \term{handler} is of type \cv{} \tcode{T} or
\cv{} \tcode{T\&} and
the \term{handler} is of type \cv{}~\tcode{T} or
\cv{}~\tcode{T\&} and
\tcode{T} is an unambiguous public base class of \tcode{E}, or
\item%
the \term{handler} is of type \cv{} \tcode{T} or \tcode{const T\&}
the \term{handler} is of type \cv{}~\tcode{T} or \tcode{const T\&}
where \tcode{T} is a pointer or pointer to member type and
\tcode{E} is a pointer or pointer to member type
that can be converted to \tcode{T} by one or more of
Expand All @@ -517,7 +516,7 @@
\end{itemize}

\item
the \term{handler} is of type \cv{} \tcode{T} or \tcode{const T\&} where \tcode{T} is a pointer or pointer to member type and \tcode{E} is \tcode{std::nullptr_t}.
the \term{handler} is of type \cv{}~\tcode{T} or \tcode{const T\&} where \tcode{T} is a pointer or pointer to member type and \tcode{E} is \tcode{std::nullptr_t}.

\end{itemize}

Expand Down Expand Up @@ -657,7 +656,7 @@

\pnum
The variable declared by the \grammarterm{exception-declaration}, of type
\cv{} \tcode{T} or \cv{} \tcode{T\&}, is initialized from the exception object,
\cv{}~\tcode{T} or \cv{}~\tcode{T\&}, is initialized from the exception object,
of type \tcode{E}, as follows:

\begin{itemize}
Expand Down
28 changes: 13 additions & 15 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
\end{note}

\pnum
If a prvalue initially has the type ``\cv{} \tcode{T}'', where
If a prvalue initially has the type ``\cv{}~\tcode{T}'', where
\tcode{T} is a cv-unqualified non-class, non-array type, the type of
the expression is adjusted to \tcode{T} prior to any further analysis.

Expand Down Expand Up @@ -1519,8 +1519,7 @@
statically chosen function (i.e., ignoring the \tcode{virtual} keyword),
even if the type of the function actually called is different.
\indextext{type!incomplete}%
This return type shall be an object type, a reference type or \cv{}
\tcode{void}.
This return type shall be an object type, a reference type or \cv{}~\tcode{void}.

\pnum
\indextext{function argument|see{argument}}%
Expand Down Expand Up @@ -1663,7 +1662,7 @@
lvalue-to-rvalue~(\ref{conv.lval}), array-to-pointer~(\ref{conv.array}),
and function-to-pointer~(\ref{conv.func}) standard conversions are
performed on the argument expression.
An argument that has (possibly cv-qualified) type \tcode{std::nullptr_t} is converted
An argument that has type \cv{}~\tcode{std::nullptr_t} is converted
to type \tcode{void*}~(\ref{conv.ptr}).
After these conversions, if the
argument does not have arithmetic, enumeration, pointer, pointer to
Expand Down Expand Up @@ -1719,7 +1718,7 @@
definedness, and if defined in meaning) to the corresponding cast
expression~(\ref{expr.cast}).
\indextext{type!incomplete}%
If the type is (possibly cv-qualified) \tcode{void}
If the type is \cv{}~\tcode{void}
and the initializer is \tcode{()},
the expression is a prvalue of the specified type
that performs no initialization.
Expand Down Expand Up @@ -1901,7 +1900,7 @@
the value obtained is a copy of the original value
\end{note}
The operand shall be a modifiable lvalue. The type of the operand shall
be an arithmetic type other than \cv{} \tcode{bool},
be an arithmetic type other than \cv{}~\tcode{bool},
or a pointer to a complete object type. The value
of the operand object is modified by adding \tcode{1} to it.
The
Expand Down Expand Up @@ -2238,8 +2237,8 @@
\tcode{static_cast}.

\pnum
Any expression can be explicitly converted to type \cv{}
\tcode{void}, in which case it becomes a discarded-value
Any expression can be explicitly converted to type \cv{}~\tcode{void},
in which case it becomes a discarded-value
expression (Clause~\ref{expr}).
\begin{note}
However, if the value is in a temporary
Expand Down Expand Up @@ -2283,7 +2282,7 @@

\pnum
A value of a scoped enumeration type~(\ref{dcl.enum}) can be explicitly converted to an
integral type. When that type is \cv{} \tcode{bool}, the resulting value is
integral type. When that type is \cv{}~\tcode{bool}, the resulting value is
\tcode{false} if the original value is zero and \tcode{true} for all other
values. For the remaining integral types, the value is unchanged if the
original value can be represented by the
Expand Down Expand Up @@ -2460,8 +2459,7 @@
the overall
restriction that a \tcode{reinterpret_cast} cannot cast away constness.}
When a prvalue \tcode{v} of object pointer type is converted to
the object pointer type ``pointer to \cv{} \tcode{T}'', the result is \tcode{static_cast<\cv{} T*>(static_cast<\cv{}
void*>(v))}.
the object pointer type ``pointer to \cv{}~\tcode{T}'', the result is \tcode{static_cast<\cv{} T*>(static_cast<\cv{}~void*>(v))}.
\begin{note}
Converting a prvalue of type ``pointer to \tcode{T1}'' to
the type ``pointer to \tcode{T2}'' (where \tcode{T1} and \tcode{T2} are
Expand Down Expand Up @@ -2726,7 +2724,7 @@
Otherwise, if the type of the expression is \tcode{T}, the result has type ``pointer to
\tcode{T}'' and is a prvalue that is the address of the designated object~(\ref{intro.memory})
or a pointer to the designated function. \begin{note} In particular, the address of an
object of type ``\cv{} \tcode{T}'' is ``pointer to \cv{} \tcode{T}'', with the same
object of type ``\cv{}~\tcode{T}'' is ``pointer to \cv{}~\tcode{T}'', with the same
cv-qualification. \end{note}
For purposes of pointer arithmetic~(\ref{expr.add}) and
comparison~(\ref{expr.rel}, \ref{expr.eq}),
Expand Down Expand Up @@ -2840,7 +2838,7 @@
is modified by adding \tcode{1}.
\indextext{prefix \tcode{\dcr}}%
The operand shall be a modifiable lvalue. The type of the operand shall
be an arithmetic type other than \cv{} \tcode{bool},
be an arithmetic type other than \cv{}~\tcode{bool},
or a pointer to a completely-defined object type.
The result is the updated operand; it is an lvalue, and it is a
bit-field if the operand is a bit-field.
Expand Down Expand Up @@ -4085,7 +4083,7 @@

\pnum
For addition or subtraction, if the expressions \tcode{P} or \tcode{Q} have
type ``pointer to \cv{} \tcode{T}'', where \tcode{T} and the array element type
type ``pointer to \cv{}~\tcode{T}'', where \tcode{T} and the array element type
are not similar~(\ref{conv.qual}), the behavior is undefined.
\begin{note} In particular, a pointer to a base class cannot be used for
pointer arithmetic when the array contains objects of a derived class type.
Expand Down Expand Up @@ -4997,7 +4995,7 @@
\end{note}

\item
a conversion from type \cv{} \tcode{void *} to a pointer-to-object type;
a conversion from type \cv{}~\tcode{void*} to a pointer-to-object type;

\item
a dynamic cast~(\ref{expr.dynamic.cast});
Expand Down
Loading