Skip to content

Commit c0dfcca

Browse files
eisenwavetkoeppe
authored andcommitted
CWG3082 Allow for call-compatible function types in reinterpret_cast
Fixes NB US 30-061 (C++26 CD).
1 parent fe509fc commit c0dfcca

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

source/expressions.tex

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4962,17 +4962,13 @@
49624962
\indextext{cast!undefined pointer-to-function}%
49634963
A function pointer can be explicitly converted
49644964
to a function pointer of a different type.
4965+
The function pointer value is unchanged by the conversion.
49654966
\indextext{function call!undefined}%
49664967
\begin{note}
49674968
The effect of calling a function through a pointer to a function
4968-
type\iref{dcl.fct} that is not the same as the type used in the
4969+
type\iref{dcl.fct} that is not call-compatible with the type used in the
49694970
definition of the function is undefined\iref{expr.call}.
49704971
\end{note}
4971-
Except that converting
4972-
a prvalue of type ``pointer to \tcode{T1}'' to the type ``pointer to
4973-
\tcode{T2}'' (where \tcode{T1} and \tcode{T2} are function types) and
4974-
back to its original type yields the original pointer value, the result
4975-
of such a pointer conversion is unspecified.
49764972

49774973
\pnum
49784974
An object pointer

0 commit comments

Comments
 (0)