Skip to content

Commit a6999a6

Browse files
jensmaurertkoeppe
authored andcommitted
[std] Use \keyword for 'reinterpret_cast'.
1 parent 3576ea2 commit a6999a6

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

source/basic.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4052,9 +4052,9 @@
40524052
conversion~(\ref{conv.ptr}, \ref{expr.type.conv}, \ref{expr.static.cast},
40534053
\ref{expr.cast}) of a safely-derived pointer value;
40544054

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

4057-
\item the result of a \tcode{reinterpret_cast} of an integer representation of a
4057+
\item the result of a \keyword{reinterpret_cast} of an integer representation of a
40584058
safely-derived pointer value;
40594059

40604060
\item the value of an object whose value was copied from a traceable pointer object,
@@ -4069,7 +4069,7 @@
40694069
only if its type is at least as large as \tcode{std::intptr_t} and it is one of the
40704070
following:
40714071
\begin{itemize}
4072-
\item the result of a \tcode{reinterpret_cast} of a safely-derived pointer value;
4072+
\item the result of a \keyword{reinterpret_cast} of a safely-derived pointer value;
40734073

40744074
\item the result of a valid conversion of an integer representation of a safely-derived
40754075
pointer value;
@@ -4395,7 +4395,7 @@
43954395
\item \keyword{const_cast}\iref{expr.const.cast},
43964396
\item \keyword{static_cast}\iref{expr.static.cast},
43974397
\item \keyword{dynamic_cast}\iref{expr.dynamic.cast}, or
4398-
\item \tcode{reinterpret_cast}\iref{expr.reinterpret.cast}
4398+
\item \keyword{reinterpret_cast}\iref{expr.reinterpret.cast}
43994399
\end{itemize}
44004400
converting, without a user-defined conversion,
44014401
a glvalue operand that is one of these expressions
@@ -5244,7 +5244,7 @@
52445244
then they have the same address,
52455245
and it is possible to obtain a pointer to one
52465246
from a pointer to the other
5247-
via a \tcode{reinterpret_cast}\iref{expr.reinterpret.cast}.
5247+
via a \keyword{reinterpret_cast}\iref{expr.reinterpret.cast}.
52485248
\begin{note}
52495249
An array object and its first element are not pointer-interconvertible,
52505250
even though they have the same address.

source/expressions.tex

Lines changed: 14 additions & 14 deletions
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}''.
@@ -5659,7 +5659,7 @@
56595659
\pnum
56605660
An explicit type conversion can be expressed using functional
56615661
notation\iref{expr.type.conv}, a type conversion operator
5662-
(\keyword{dynamic_cast}, \keyword{static_cast}, \tcode{reinterpret_cast},
5662+
(\keyword{dynamic_cast}, \keyword{static_cast}, \keyword{reinterpret_cast},
56635663
\keyword{const_cast}), or the \term{cast} notation.
56645664

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

71817181
\item
7182-
a \tcode{reinterpret_cast}\iref{expr.reinterpret.cast};
7182+
a \keyword{reinterpret_cast}\iref{expr.reinterpret.cast};
71837183

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

source/templates.tex

Lines changed: 1 addition & 1 deletion
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)