<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1156</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="1156"></A><H4>1156.
  
Partial ordering in a non-call context
</H4>
<B>Section: </B>13.7.7.3&#160; [<A href="https://wg21.link/temp.func.order">temp.func.order</A>]
 &#160;&#160;&#160;

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

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

 <B>Date: </B>2010-08-03<BR><BR>


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

<A href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3296.html#US70">N3092 comment
  US&#160;70<BR></A>

<P>13.10.3.5 [<A href="https://wg21.link/temp.deduct.partial#3">temp.deduct.partial</A>] paragraph 3 specifies that
the deduction used in partial ordering in a non-call context
is based on the complete function type of the function
templates. The wording in 13.7.7.3 [<A href="https://wg21.link/temp.func.order#2">temp.func.order</A>] paragraph 2
(and echoed in paragraph 4) reflects an earlier
specification, however, saying that the deduction uses only
&#8220;the function parameter types, or in the case of a
conversion function the return type.&#8221; This is a
contradiction.  The wording in 13.7.7.3 [<A href="https://wg21.link/temp.func.order">temp.func.order</A>]
should be changed.</P>

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

<OL>
<LI><P>Change 13.7.7.3 [<A href="https://wg21.link/temp.func.order#2">temp.func.order</A>] paragraph 2 as
follows:</P></LI>

<BLOCKQUOTE>

Partial ordering selects which of two function templates is more
specialized than the other by transforming each template in turn (see
next paragraph) and performing template argument deduction using the
function <DEL>parameter types, or in the case of a conversion function
the return</DEL> type. The deduction process determines whether one of
the templates is more specialized than the other. If so, the more
specialized template is the one chosen by the partial ordering
process.

</BLOCKQUOTE>

<LI><P>Change 13.7.7.3 [<A href="https://wg21.link/temp.func.order#4">temp.func.order</A>] paragraph 4 as follows:</P></LI>

<BLOCKQUOTE>

Using the transformed function template's function <DEL>parameter
list, or in the case of a conversion function its transformed
return</DEL> type, perform type deduction against the function
<DEL>parameter list (or return type)</DEL> <INS>type</INS> of the
other function <INS>template</INS>. The mechanism for performing these
deductions is given in 13.10.3.5 [<A href="https://wg21.link/temp.deduct.partial">temp.deduct.partial</A>].

</BLOCKQUOTE>

</OL>

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