Skip to content

Commit 22200fe

Browse files
committed
[std] Use \keyword for 'reinterpret_cast'.
1 parent 576182b commit 22200fe

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

source/basic.tex

+5-5
Original file line numberDiff line numberDiff line change
@@ -4025,9 +4025,9 @@
40254025
conversion~(\ref{conv.ptr}, \ref{expr.type.conv}, \ref{expr.static.cast},
40264026
\ref{expr.cast}) of a safely-derived pointer value;
40274027

4028-
\item the result of a \tcode{reinterpret_cast} of a safely-derived pointer value;
4028+
\item the result of a \keyword{reinterpret_cast} of a safely-derived pointer value;
40294029

4030-
\item the result of a \tcode{reinterpret_cast} of an integer representation of a
4030+
\item the result of a \keyword{reinterpret_cast} of an integer representation of a
40314031
safely-derived pointer value;
40324032

40334033
\item the value of an object whose value was copied from a traceable pointer object,
@@ -4042,7 +4042,7 @@
40424042
only if its type is at least as large as \tcode{std::intptr_t} and it is one of the
40434043
following:
40444044
\begin{itemize}
4045-
\item the result of a \tcode{reinterpret_cast} of a safely-derived pointer value;
4045+
\item the result of a \keyword{reinterpret_cast} of a safely-derived pointer value;
40464046

40474047
\item the result of a valid conversion of an integer representation of a safely-derived
40484048
pointer value;
@@ -4368,7 +4368,7 @@
43684368
\item \keyword{const_cast}\iref{expr.const.cast},
43694369
\item \keyword{static_cast}\iref{expr.static.cast},
43704370
\item \keyword{dynamic_cast}\iref{expr.dynamic.cast}, or
4371-
\item \tcode{reinterpret_cast}\iref{expr.reinterpret.cast}
4371+
\item \keyword{reinterpret_cast}\iref{expr.reinterpret.cast}
43724372
\end{itemize}
43734373
converting, without a user-defined conversion,
43744374
a glvalue operand that is one of these expressions
@@ -5217,7 +5217,7 @@
52175217
then they have the same address,
52185218
and it is possible to obtain a pointer to one
52195219
from a pointer to the other
5220-
via a \tcode{reinterpret_cast}\iref{expr.reinterpret.cast}.
5220+
via a \keyword{reinterpret_cast}\iref{expr.reinterpret.cast}.
52215221
\begin{note}
52225222
An array object and its first element are not pointer-interconvertible,
52235223
even though they have the same address.

source/expressions.tex

+14-14
Original file line numberDiff line numberDiff line change
@@ -2930,7 +2930,7 @@
29302930
\begin{note}
29312931
The \tcode{>} token following the
29322932
\grammarterm{type-id} in a \keyword{dynamic_cast},
2933-
\keyword{static_cast}, \tcode{reinterpret_cast}, or
2933+
\keyword{static_cast}, \keyword{reinterpret_cast}, or
29342934
\keyword{const_cast} can be the product of replacing a
29352935
\tcode{>>} token by two consecutive \tcode{>}
29362936
tokens\iref{temp.names}.
@@ -3957,18 +3957,18 @@
39573957
lvalue-to-rvalue\iref{conv.lval}, array-to-pointer\iref{conv.array},
39583958
and function-to-pointer\iref{conv.func} standard conversions are
39593959
performed on the expression \tcode{v}. Conversions that can be performed explicitly
3960-
using \tcode{reinterpret_cast} are listed below. No other conversion can
3961-
be performed explicitly using \tcode{reinterpret_cast}.
3960+
using \keyword{reinterpret_cast} are listed below. No other conversion can
3961+
be performed explicitly using \keyword{reinterpret_cast}.
39623962

39633963
\pnum
3964-
The \tcode{reinterpret_cast} operator shall not cast away constness\iref{expr.const.cast}.
3964+
The \keyword{reinterpret_cast} operator shall not cast away constness\iref{expr.const.cast}.
39653965
An expression of integral, enumeration, pointer, or pointer-to-member type
39663966
can be explicitly converted to its own type; such a cast yields the value of
39673967
its operand.
39683968

39693969
\pnum
39703970
\begin{note}
3971-
The mapping performed by \tcode{reinterpret_cast} might, or might not, produce a
3971+
The mapping performed by \keyword{reinterpret_cast} might, or might not, produce a
39723972
representation different from the original value.
39733973
\end{note}
39743974

@@ -3987,7 +3987,7 @@
39873987
type; the conversion has the same meaning and validity as a conversion of
39883988
\tcode{(void*)0} to the integral type.
39893989
\begin{note}
3990-
A \tcode{reinterpret_cast}
3990+
A \keyword{reinterpret_cast}
39913991
cannot be used to convert a value of any type to the type
39923992
\tcode{std::nullptr_t}.
39933993
\end{note}
@@ -4035,7 +4035,7 @@
40354035
The
40364036
types can have different \cv-qualifiers, subject to
40374037
the overall
4038-
restriction that a \tcode{reinterpret_cast} cannot cast away constness.
4038+
restriction that a \keyword{reinterpret_cast} cannot cast away constness.
40394039
\end{footnote}
40404040
When a prvalue \tcode{v} of object pointer type is converted to
40414041
the object pointer type ``pointer to \cv{}~\tcode{T}'', the result is \tcode{static_cast<\cv{} T*>(static_cast<\cv{}~void*>(v))}.
@@ -4078,7 +4078,7 @@
40784078
\begin{footnote}
40794079
\tcode{T1} and \tcode{T2} can have
40804080
different \cv-qualifiers, subject to
4081-
the overall restriction that a \tcode{reinterpret_cast} cannot cast away
4081+
the overall restriction that a \keyword{reinterpret_cast} cannot cast away
40824082
constness.
40834083
\end{footnote}
40844084
The null member pointer value\iref{conv.mem} is converted to the
@@ -4106,7 +4106,7 @@
41064106
can be cast to the type ``reference to \tcode{T2}''
41074107
if an expression of type ``pointer to \tcode{T1}''
41084108
can be explicitly converted to the type ``pointer to \tcode{T2}''
4109-
using a \tcode{reinterpret_cast}.
4109+
using a \keyword{reinterpret_cast}.
41104110
The result is that of \tcode{*reinterpret_cast<T2 *>(p)}
41114111
where \tcode{p} is a pointer to \placeholder{x}
41124112
of type ``pointer to \tcode{T1}''.
@@ -5658,7 +5658,7 @@
56585658
\pnum
56595659
An explicit type conversion can be expressed using functional
56605660
notation\iref{expr.type.conv}, a type conversion operator
5661-
(\keyword{dynamic_cast}, \keyword{static_cast}, \tcode{reinterpret_cast},
5661+
(\keyword{dynamic_cast}, \keyword{static_cast}, \keyword{reinterpret_cast},
56625662
\keyword{const_cast}), or the \term{cast} notation.
56635663

56645664
\begin{bnf}
@@ -5680,8 +5680,8 @@
56805680
\item a \keyword{const_cast}\iref{expr.const.cast},
56815681
\item a \keyword{static_cast}\iref{expr.static.cast},
56825682
\item a \keyword{static_cast} followed by a \keyword{const_cast},
5683-
\item a \tcode{reinterpret_cast}\iref{expr.reinterpret.cast}, or
5684-
\item a \tcode{reinterpret_cast} followed by a \keyword{const_cast},
5683+
\item a \keyword{reinterpret_cast}\iref{expr.reinterpret.cast}, or
5684+
\item a \keyword{reinterpret_cast} followed by a \keyword{const_cast},
56855685
\end{itemize}
56865686
can be performed using the cast notation of explicit type conversion.
56875687
The same semantic restrictions and behaviors apply, with the exception
@@ -5728,7 +5728,7 @@
57285728
using the cast notation can be ``pointer to incomplete class type''. If
57295729
both the operand and destination types are class types and one or both
57305730
are incomplete, it is unspecified whether the \keyword{static_cast} or the
5731-
\tcode{reinterpret_cast} interpretation is used, even if there is an
5731+
\keyword{reinterpret_cast} interpretation is used, even if there is an
57325732
inheritance relationship between the two classes.
57335733
\begin{note}
57345734
For example, if the classes were defined later in the translation unit,
@@ -7178,7 +7178,7 @@
71787178
a conversion from type \cv{}~\tcode{void*} to a pointer-to-object type;
71797179

71807180
\item
7181-
a \tcode{reinterpret_cast}\iref{expr.reinterpret.cast};
7181+
a \keyword{reinterpret_cast}\iref{expr.reinterpret.cast};
71827182

71837183
\item
71847184
a modification of an object~(\ref{expr.ass}, \ref{expr.post.incr},

source/templates.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@
747747
\tcode{>}
748748
\begin{footnote}
749749
A \tcode{>} that encloses the \grammarterm{type-id}
750-
of a \keyword{dynamic_cast}, \keyword{static_cast}, \tcode{reinterpret_cast}
750+
of a \keyword{dynamic_cast}, \keyword{static_cast}, \keyword{reinterpret_cast}
751751
or \keyword{const_cast}, or which encloses the \grammarterm{template-argument}{s}
752752
of a subsequent \grammarterm{template-id}, is considered nested for the purpose
753753
of this description.

0 commit comments

Comments
 (0)