<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 149</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="149"></A><H4>149.
  
Accessibility and ambiguity
</H4>
<B>Section: </B>7.3.12&#160; [<A href="https://wg21.link/conv.ptr">conv.ptr</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Nathan Sidwell
 &#160;&#160;&#160;

 <B>Date: </B>31 Jul 1999<BR>



<P>The Standard uses confusing terminology when referring to
accessibility in connection with ambiguity.  For instance:</P>

<P>7.3.12 [<A href="https://wg21.link/conv.ptr#3">conv.ptr</A>] paragraph 3:
</P>

<BLOCKQUOTE>
If <TT>B</TT> is an inaccessible or ambiguous base ...
</BLOCKQUOTE>

7.6.1.7 [<A href="https://wg21.link/expr.dynamic.cast#8">expr.dynamic.cast</A>] paragraph 8:


<BLOCKQUOTE>
... has an unambiguous public base ...
</BLOCKQUOTE>

11.7.3 [<A href="https://wg21.link/class.virtual#5">class.virtual</A>] paragraph 5:


<BLOCKQUOTE>
... is an unambiguous direct or indirect base ... and
is accessible ...
</BLOCKQUOTE>

14.4 [<A href="https://wg21.link/except.handle#3">except.handle</A>] paragraph 3:


<BLOCKQUOTE>
not involving conversions to pointers to private or
protected or ambiguous classes
</BLOCKQUOTE>

<P>The phrase "unambiguous public base" is unfortunate as it
could mean either "an
unambiguous base not considering accessibility, which is public"
or "an
unambiguous base considering only the publicly accessible bases."
I believe the
former interpretation correct, as accessibility is applied after visibility
(11.8 [<A href="https://wg21.link/class.access#4">class.access</A>] paragraph 4)

and ambiguity is described in terms of visibility
(6.5.2 [<A href="https://wg21.link/class.member.lookup#2">class.member.lookup</A>] paragraph 2)
.</P>

<P>Suggested Resolution:
Use the phrases "public and unambiguous,"
"accessible and unambiguous,"
"non-public or ambiguous," or "inaccessible or ambiguous" as appropriate.</P>

<P>
<B>Proposed resolution (10/00):</B>
<UL>
<LI>
7.6.1.7 [<A href="https://wg21.link/expr.dynamic.cast#8">expr.dynamic.cast</A>] paragraph 8,

bullet 2: change "unambiguous public base class" to "unambiguous
and public base class"</LI>
<LI>
11.7.3 [<A href="https://wg21.link/class.virtual#5">class.virtual</A>] paragraph 5:
 change
"the class in the return type... is an unambiguous direct or
indirect base class... and is accessible in <TT>D</TT>" to "the
class in the return type... is an unambiguous and accessible direct
or indirect base class..."</LI>
</UL>
</P>
<BR><BR>
</BODY>
</HTML>
