<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 2384</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="2384"></A><H4>2384.
  
Conversion function templates and qualification conversions
</H4>
<B>Section: </B>13.10.3.4&#160; [<A href="https://wg21.link/temp.deduct.conv">temp.deduct.conv</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>John Spicer
 &#160;&#160;&#160;

 <B>Date: </B>2018-07-24<BR>


<P>[Accepted as a DR at the February, 2019 meeting.]</P>

<P>
<A HREF="349.html">Issue 349</A> resulted in the following
specification in 13.10.3.4 [<A href="https://wg21.link/temp.deduct.conv#7">temp.deduct.conv</A>] paragraph 7:</P>

<BLOCKQUOTE>

<P>When the deduction process requires a qualification conversion for a
pointer or pointer-to-member type as described above, the following process
is used to determine the deduced template argument values: If <TT>A</TT>
is a type</P>

<UL>
<I>cv</I><SUB>1,0</SUB> &#8220;pointer to...&#8221; <I>cv</I><SUB>1,<I>n</I>-1</SUB> &#8220;pointer to&#8221; <I>cv</I><SUB>1,<I>n</I></SUB> <TT>T1</TT>
</UL>

<P>and <TT>P</TT> is a type</P>

<UL>
<I>cv</I><SUB>2,0</SUB> &#8220;pointer to...&#8221; <I>cv</I><SUB>2,<I>n</I>-1</SUB> &#8220;pointer to&#8221; <I>cv</I><SUB>2,<I>n</I></SUB> <TT>T2</TT>
</UL>

<P>then the cv-unqualified <TT>T1</TT> and <TT>T2</TT> are used as the
types of <TT>A</TT> and <TT>P</TT> respectively for type deduction.
[<I>Example:</I>
</P>

<PRE>
  struct A {
    template &lt;class T&gt; operator T***();
  };
  A a;
  const int * const * const * p1 = a; //<SPAN CLASS="cmnt"> </SPAN>T<SPAN CLASS="cmnt"> is deduced as </SPAN>int<SPAN CLASS="cmnt">, not </SPAN>const int
</PRE>

<P>&#8212;<I>end example</I>]</P>

</BLOCKQUOTE>

<P>This rule is not widely implemented and may not be desirable. Should
it be removed?</P>

<P><B>Proposed resolutions (December, 2018):</B></P>

<P>Delete 13.10.3.4 [<A href="https://wg21.link/temp.deduct.conv#7">temp.deduct.conv</A>] paragraph 7:</P>

<BLOCKQUOTE>

<P><DEL>When the deduction process requires a qualification conversion for a
pointer or pointer-to-member type as described above, the following process
is used to determine the deduced template argument values: If <TT>A</TT>
is a type</DEL></P>

<UL><DEL><I>cv</I><SUB>1,0</SUB> &#8220;pointer to...&#8221; <I>cv</I><SUB>1,<I>n</I>-1</SUB> &#8220;pointer to&#8221; <I>cv</I><SUB>1,<I>n</I></SUB> <TT>T1</TT></DEL></UL>

<P><DEL>and <TT>P</TT> is a type</DEL></P>

<UL><DEL><I>cv</I><SUB>2,0</SUB> &#8220;pointer to...&#8221; <I>cv</I><SUB>2,<I>n</I>-1</SUB> &#8220;pointer to&#8221; <I>cv</I><SUB>2,<I>n</I></SUB> <TT>T2</TT></DEL></UL>

<P><DEL>then the cv-unqualified <TT>T1</TT> and <TT>T2</TT> are used as the
types of <TT>A</TT> and <TT>P</TT> respectively for type deduction.
[<I>Example:</I></DEL></P>

<PRE>
<DEL>  struct A {
    template &lt;class T&gt; operator T***();
  };
  A a;
  const int * const * const * p1 = a; //<SPAN CLASS="cmnt"> </SPAN>T<SPAN CLASS="cmnt"> is deduced as </SPAN>int<SPAN CLASS="cmnt">, not </SPAN>const int</DEL>
</PRE>

<P><DEL>&#8212;<I>end example</I>]</DEL></P>

</BLOCKQUOTE>

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