<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1364</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="1364"></A><H4>1364.
  
<TT>constexpr</TT> function parameters
</H4>
<B>Section: </B>7.7&#160; [<A href="https://wg21.link/expr.const">expr.const</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Sean Hunt
 &#160;&#160;&#160;

 <B>Date: </B>2011-08-17<BR>


<P>[Voted into the WP at the February, 2012 meeting;
moved to DR at the October, 2012 meeting.]</P>



<P>Use of a parameter in a <TT>constexpr</TT> function appears to be
ill-formed, because the lvalue-to-rvalue conversion on the parameter
is not one of those permitted in a constant expression.</P>

<P><B>Proposed resolution (August, 2011):</B></P>

<OL>
<LI><P>Change the indicated bullet of 7.7 [<A href="https://wg21.link/expr.const#2">expr.const</A>] paragraph 2
as follows:</P></LI>

<UL><LI><P>an invocation of a <TT>constexpr</TT> constructor with
arguments that, when substituted by function invocation substitution
(9.2.6 [<A href="https://wg21.link/dcl.constexpr">dcl.constexpr</A>]), do not produce all constant expressions
for the constructor calls and full-expressions in the
<I>mem-initializer</I>s <INS>(including conversions)</INS>;
[<I>Example:</I>...</P></LI></UL>

<LI><P>Delete the final bullet of 9.2.6 [<A href="https://wg21.link/dcl.constexpr#3">dcl.constexpr</A>] paragraph 3
and move the deleted "." to the preceding
sub-bullet:</P></LI>

<UL><LI><P><DEL>every constructor call and implicit conversion used in
initializing the return value (8.8.4 [<A href="https://wg21.link/stmt.return">stmt.return</A>],
9.5 [<A href="https://wg21.link/dcl.init">dcl.init</A>]) shall be one of those allowed in a constant
expression (7.7 [<A href="https://wg21.link/expr.const">expr.const</A>]).</DEL></P></LI></UL>

<LI><P>Delete the final bullet of 9.2.6 [<A href="https://wg21.link/dcl.constexpr#4">dcl.constexpr</A>] paragraph 4
and change the preceding bullet as follows:</P></LI>

<UL>
<LI><P>every <I>assignment-expression</I> that is an
<I>initializer-clause</I> appearing directly or indirectly within a
<I>brace-or-equal-initializer</I> for a non-static data member that is not
named by a <I>mem-initializer-id</I> shall be a constant expression<DEL>;
and</DEL><INS>.</INS>
</P></LI>

<LI><P><DEL>every implicit conversion used in converting a constructor
argument to the corresponding parameter type and converting a
full-expression to the corresponding member type shall be one of those
allowed in a constant expression.</DEL></P></LI>

</UL>

</OL>

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