<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 983</TITLE>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<STYLE TYPE="text/css">
  INS { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  .INS { text-decoration:none; background-color:#D0FFD0 }
  DEL { text-decoration:line-through; background-color:#FFA0A0 }
  .DEL { text-decoration:line-through; background-color: #FFD0D0 }
  @media (prefers-color-scheme: dark) {
    HTML { background-color:#202020; color:#f0f0f0; }
    A { color:#5bc0ff; }
    A:visited { color:#c6a8ff; }
    A:hover, a:focus { color:#afd7ff; }
    INS { background-color:#033a16; color:#aff5b4; }
    .INS { background-color: #033a16; }
    DEL { background-color:#67060c; color:#ffdcd7; }
    .DEL { background-color:#67060c; }
  }
  SPAN.cmnt { font-family:Times; font-style:italic }
</STYLE>
</HEAD>
<BODY>
<P><EM>This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21
  Core Issues List revision 118b.
  See http://www.open-std.org/jtc1/sc22/wg21/ for the official
  list.</EM></P>
<P>2025-09-28</P>
<HR>
<A NAME="983"></A><H4>983.
  
Ambiguous pointer-to-member constant
</H4>
<B>Section: </B>7.6.2.2&#160; [<A href="https://wg21.link/expr.unary.op">expr.unary.op</A>]
 &#160;&#160;&#160;

 <B>Status: </B>CD2
 &#160;&#160;&#160;

 <B>Submitter: </B>Daniel Kr&#252;gler
 &#160;&#160;&#160;

 <B>Date: </B>19 October, 2009<BR>


<P>[Voted into WP at March, 2010 meeting.]</P>



<P>The resolution of issue 39 changed the diagnosis of ambiguity
because of multiple subobjects from being a lookup error to being
diagnosed where the result of the lookup is used.  The formation of a
pointer to member is one such context but was overlooked in the
changes.  7.6.2.2 [<A href="https://wg21.link/expr.unary.op#3">expr.unary.op</A>] paragraph 3 should have language
similar to 7.6.1.5 [<A href="https://wg21.link/expr.ref#5">expr.ref</A>] paragraph 5 and should be
mentioned in the note in 6.5.2 [<A href="https://wg21.link/class.member.lookup#13">class.member.lookup</A>] paragraph 13.</P>

<P><B>Proposed resolution (October, 2009):</B></P>

<OL>
<LI><P>Change 7.6.2.2 [<A href="https://wg21.link/expr.unary.op#3">expr.unary.op</A>] paragraph 3 as follows:</P></LI>

<BLOCKQUOTE>

...For a <I>qualified-id</I>, if the member is a static member of type
&#8220;<TT>T</TT>&#8221;, the type of the result is plain
&#8220;pointer to <TT>T</TT>.&#8221; If the member is a non-static
member of class <TT>C</TT> of type <TT>T</TT>, the type of the result
is &#8220;pointer to member of class <TT>C</TT> of type
<TT>T</TT><DEL>.</DEL><INS>,</INS>&#8221; <INS>and the program is
ill-formed if <TT>C</TT> is an ambiguous base (6.5.2 [<A href="https://wg21.link/class.member.lookup">class.member.lookup</A>]) of the class designated by the
<I>nested-name-specifier</I> of the <I>qualified-id</I>.</INS>...

</BLOCKQUOTE>

<LI><P>Change 6.5.2 [<A href="https://wg21.link/class.member.lookup#13">class.member.lookup</A>] paragraph 13 as follows:</P></LI>

<BLOCKQUOTE>

[<I>Note:</I> Even if the result of name lookup is unambiguous, use of
a name found in multiple subobjects might still be ambiguous
(7.3.13 [<A href="https://wg21.link/conv.mem">conv.mem</A>], 7.6.1.5 [<A href="https://wg21.link/expr.ref">expr.ref</A>],
<INS>7.6.2.2 [<A href="https://wg21.link/expr.unary.op">expr.unary.op</A>],</INS> 11.8.3 [<A href="https://wg21.link/class.access.base">class.access.base</A>]). &#8212;<I>end note</I>] [<I>Example:</I>...

</BLOCKQUOTE>

</OL>

<BR><BR>
</BODY>
</HTML>
