diff --git a/source/basic.tex b/source/basic.tex index cc01380a4b..045ba02b4b 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -3610,7 +3610,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. @@ -3665,7 +3665,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 @@ -3930,19 +3930,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 @@ -3968,7 +3968,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 % @@ -4013,7 +4013,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 @@ -4108,9 +4108,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\ +An object of type \cv{} \tcode{void*} shall have the same representation and alignment -requirements as \cv\ \tcode{char*}. +requirements as \cv{} \tcode{char*}. \rSec2[basic.type.qualifier]{CV-qualifiers} @@ -4187,7 +4187,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} diff --git a/source/declarators.tex b/source/declarators.tex index 831f5a81d3..c02b2d6b56 100644 --- a/source/declarators.tex +++ b/source/declarators.tex @@ -805,9 +805,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\ +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{example} +the type ``rvalue reference to \cv{} \tcode{TR}'' creates the type \tcode{TR}. \begin{example} \begin{codeblock} int i; @@ -2338,12 +2338,12 @@ \tcode{v}$_0$, \tcode{v}$_1$, \tcode{v}$_2$, ... of the \grammarterm{identifier-list} as names~(\ref{basic.scope.declarative}). -Let \cv\ denote the +Let \cv{} denote the \grammarterm{cv-qualifier}{s} in the \grammarterm{decl-specifier-seq}. First, a variable with a unique name \tcode{e} is introduced. If the \grammarterm{assignment-expression} in the \grammarterm{brace-or-equal-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{brace-or-equal-initializer}. Otherwise, \tcode{e} is defined as-if by @@ -2407,8 +2407,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} diff --git a/source/exceptions.tex b/source/exceptions.tex index 460e11a84f..42a9060feb 100644 --- a/source/exceptions.tex +++ b/source/exceptions.tex @@ -733,9 +733,9 @@ A type denoted in a \grammarterm{dynamic-exception-specification} shall not denote a pointer or reference to an incomplete type, other than -``pointer to \cv\ \tcode{void}''. +``pointer to \cv{} \tcode{void}''. A type -\cv\ \tcode{T} +\cv{} \tcode{T} denoted in a \grammarterm{dynamic-exception-specification} is adjusted to type \tcode{T}. A type diff --git a/source/expressions.tex b/source/expressions.tex index bea4f3a815..052c4fc111 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -1894,7 +1894,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 @@ -2232,7 +2232,7 @@ \tcode{static_cast}. \pnum -Any expression can be explicitly converted to type \cv\ +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} @@ -2277,7 +2277,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 @@ -2454,7 +2454,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\ +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 @@ -2720,7 +2720,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}), @@ -2834,7 +2834,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. @@ -4080,7 +4080,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. diff --git a/source/statements.tex b/source/statements.tex index 3cafce03df..6c8abf4f1c 100644 --- a/source/statements.tex +++ b/source/statements.tex @@ -799,14 +799,14 @@ The \grammarterm{expr-or-braced-init-list} of a return statement is called its operand. A return statement with no operand shall be used only in a function whose return type is -\cv\ \tcode{void}, a constructor~(\ref{class.ctor}), or a +\cv{} \tcode{void}, a constructor~(\ref{class.ctor}), or a destructor~(\ref{class.dtor}). \indextext{\idxcode{return}!constructor~and}% \indextext{\idxcode{return}!constructor~and}% A return statement with an operand of type \tcode{void} shall be used only -in a function whose return type is \cv\ \tcode{void}. +in a function whose return type is \cv{} \tcode{void}. A return statement with any other operand shall be used only -in a function whose return type is not \cv\ \tcode{void}; +in a function whose return type is not \cv{} \tcode{void}; \indextext{conversion!return~type}% the return statement initializes the glvalue result or prvalue result object of the (explicit or implicit) function call @@ -828,7 +828,7 @@ Flowing off the end of a constructor, a destructor, or -a function with a \cv\ \tcode{void} return type is +a function with a \cv{} \tcode{void} return type is equivalent to a \tcode{return} with no operand. Otherwise, flowing off the end of a function other than \tcode{main}~(\ref{basic.start.main})