From 4260ef89744976cbcfed09ed154c9513ee57e52e Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sun, 6 Aug 2023 21:03:37 +0200 Subject: [PATCH] [conv.mem] itemize p2 --- source/expressions.tex | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index 480516076a..ac82b28ea8 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -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 @@ -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} pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy