<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1764</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="1764"></A><H4>1764.
  
Hiding of function from using-declaration by signature
</H4>
<B>Section: </B>6.5.2&#160; [<A href="https://wg21.link/class.member.lookup">class.member.lookup</A>]
 &#160;&#160;&#160;

 <B>Status: </B>C++14
 &#160;&#160;&#160;

 <B>Submitter: </B>Canada
 &#160;&#160;&#160;

 <B>Date: </B>2013-09-23<BR><BR>


<A href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3903.html#CA6">N3690 comment
  CA&#160;6<BR></A>

<P>[Moved to DR at the February, 2014 meeting.]</P>

<P>According to 9.10 [<A href="https://wg21.link/namespace.udecl#15">namespace.udecl</A>] paragraph 15,</P>

<BLOCKQUOTE>

When a <I>using-declaration</I> brings names from a base class into a
derived class scope, member functions and member function templates in the
derived class override and/or hide member functions and member function
templates with the same name, parameter-type-list
(9.3.4.6 [<A href="https://wg21.link/dcl.fct">dcl.fct</A>]), cv-qualification, and <I>ref-qualifier</I>
(if any) in a base class (rather than conflicting).

</BLOCKQUOTE>

<P>The algorithm for class-scope name lookup given in
6.5.2 [<A href="https://wg21.link/class.member.lookup">class.member.lookup</A>], however, does not implement this requirement;
there is nothing that removes a hidden base class member (replacing
the <I>using-declaration</I>, per paragraph 3) from the result set.</P>

<P><B>Proposed resolution (September, 2013):</B></P>

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

<BLOCKQUOTE>

The <I>lookup set</I> for <TT>f</TT> in <TT>C</TT>, called <I>S(f, C)</I>,
consists of two component sets: the <I>declaration set</I>, a set of
members named <TT>f</TT>; and the <I>subobject set</I>, a set of subobjects
where declarations of these members (possibly
including <I>using-declaration</I>s) were found. In the declaration
set, <I>using-declaration</I>s are replaced by the <DEL>members they
designate</DEL> <INS>set of designated members that are not hidden or
overridden by members of the derived class
(9.10 [<A href="https://wg21.link/namespace.udecl">namespace.udecl</A>])</INS>, and type declarations (including
injected-class-names) are replaced by the types they designate...

</BLOCKQUOTE>

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