<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 749</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="749"></A><H4>749.
  
References to function types with a <I>cv-qualifier</I> or <I>ref-qualifier</I>
</H4>
<B>Section: </B>12.5&#160; [<A href="https://wg21.link/over.built">over.built</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Alberto Ganesh Barbati
 &#160;&#160;&#160;

 <B>Date: </B>9 December, 2008<BR>


<P>[Voted into WP at July, 2009 meeting.]</P>



<P>12.5 [<A href="https://wg21.link/over.built#7">over.built</A>] paragraph 7 posits the existence of
built-in candidate <TT>operator*</TT> functions &#8220;for every
function type <I>T</I>.&#8221; However, only non-static member
function types can contain a <I>cv-qualifier</I> or
<I>ref-qualifier</I> (9.3.4.6 [<A href="https://wg21.link/dcl.fct#7">dcl.fct</A>] paragraph 7), and a
reference to such a type cannot be initialized (7.6.1.5 [<A href="https://wg21.link/expr.ref#4">expr.ref</A>] paragraph 4, bullet 3, sub-bullet 2).  (See also
_N2914_.14.10.4 [<A href="https://wg21.link/concept.support#10">concept.support</A>] paragraph 10, which disallows references
to function types with <I>cv-qualifier</I>s but is silent on
<I>ref-qualifier</I>s.)</P>

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

<OL>
<LI><P>Change 12.5 [<A href="https://wg21.link/over.built#7">over.built</A>] paragraph 7 as follows:</P></LI>

<BLOCKQUOTE>

For every function type <I>T</I> <INS>that does not have cv-qualifiers
or a <I>ref-qualifier</I></INS>, there exist candidate operator
functions of the form

<UL>
<I>T</I> <TT>&amp;   operator*(</TT>T<TT>*);</TT>
</UL>

</BLOCKQUOTE>

<LI><P>Change _N2914_.14.10.4 [<A href="https://wg21.link/concept.support#7">concept.support</A>] paragraph 7 as follows:</P></LI>

<BLOCKQUOTE>

<I>Requires:</I> for every type <TT>T</TT> that is an object type, a
function type that does not have cv-qualifiers <INS>or a
<I>ref-qualifier</I></INS>, or <I>cv</I> <TT>void</TT>, a concept map
<TT>PointeeType&lt;T&gt;</TT> is implicitly defined in namespace
<TT>std</TT>.

</BLOCKQUOTE>

<LI><P>Change _N2914_.14.10.4 [<A href="https://wg21.link/concept.support#11">concept.support</A>] paragraph 11 as follows:</P></LI>

<BLOCKQUOTE>

<I>Requires:</I> for every type <TT>T</TT> that is an object type, a
function type that does not have cv-qualifiers <INS>or a
<I>ref-qualifier</I></INS>, or a reference type, a concept map
<TT>ReferentType&lt;T&gt;</TT> is implicitly defined in namespace
<TT>std</TT>.

</BLOCKQUOTE>

</OL>

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