Skip to content

[conv.mem] Itemize p2 #6437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1063,18 +1063,20 @@
\tcode{T}'', where \tcode{B} is a class type, can be converted to
a prvalue of type ``pointer to member of \tcode{D} of type \cv{}
\tcode{T}'', where \tcode{D} is a complete class derived\iref{class.derived}
from \tcode{B}. If \tcode{B} is an
inaccessible\iref{class.access},
from \tcode{B}, as follows:
\begin{itemize}
\item If \tcode{B} is an inaccessible\iref{class.access},
ambiguous\iref{class.member.lookup}, or virtual\iref{class.mi} base
class of \tcode{D}, or a base class of a virtual base class of
\tcode{D}, a program that necessitates this conversion is ill-formed.
If class \tcode{D} does not contain the original member and
\item If class \tcode{D} does not contain the original member and
is not a base class of the class containing the original member,
the behavior is undefined. Otherwise,
the result of the conversion refers to the same member as the pointer to
the behavior is undefined.
\item Otherwise, the result of the conversion refers to the same member as the pointer to
member before the conversion took place, but it refers to the base class
member as if it were a member of the derived class. The result refers to
the member in \tcode{D}'s instance of \tcode{B}. Since the result has
the member in \tcode{D}'s instance of \tcode{B}.
Since the result has
type ``pointer to member of \tcode{D} of type \cv{} \tcode{T}'',
indirection through it with a \tcode{D} object is valid. The result is the same
as if indirecting through the pointer to member of \tcode{B} with the
Expand All @@ -1094,6 +1096,7 @@
In particular, a pointer to member cannot be converted to a
\tcode{\keyword{void}*}.
\end{footnote}
\end{itemize}

\rSec2[conv.fctptr]{Function pointer conversions}

Expand Down