Skip to content

Commit be6d0b1

Browse files
burblebeetkoeppe
authored andcommitted
CWG2716 Rule about self-or-base conversion is normatively redundant
1 parent 5b59344 commit be6d0b1

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

‎source/classes.tex‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,17 +2479,16 @@
24792479
returning \grammarterm{conversion-type-id}''.
24802480

24812481
\pnum
2482-
A conversion function is never used to convert a (possibly cv-qualified) object
2483-
to the (possibly cv-qualified) same object type (or a reference to it),
2484-
to a (possibly cv-qualified) base class of that type (or a reference to it),
2482+
\begin{note}
2483+
A conversion function is never invoked for
2484+
implicit or explicit conversions of an object
2485+
to the same object type (or a reference to it),
2486+
to a base class of that type (or a reference to it),
24852487
or to \cv{}~\keyword{void}.
2486-
\begin{footnote}
2487-
These conversions are considered
2488-
as standard conversions for the purposes of overload resolution\iref{over.best.ics,over.ics.ref} and therefore initialization\iref{dcl.init} and explicit casts\iref{expr.static.cast}. A conversion to \keyword{void} does not invoke any conversion function\iref{expr.static.cast}.
24892488
Even though never directly called to perform a conversion,
24902489
such conversion functions can be declared and can potentially
24912490
be reached through a call to a virtual conversion function in a base class.
2492-
\end{footnote}
2491+
\end{note}
24932492
\begin{example}
24942493
\begin{codeblock}
24952494
struct X {

0 commit comments

Comments
 (0)