This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-10-26
[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]
Use of a parameter in a constexpr 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.
Proposed resolution (August, 2011):
Change the indicated bullet of 7.7 [expr.const] paragraph 2 as follows:
an invocation of a constexpr constructor with arguments that, when substituted by function invocation substitution (9.2.6 [dcl.constexpr]), do not produce all constant expressions for the constructor calls and full-expressions in the mem-initializers (including conversions); [Example:...
Delete the final bullet of 9.2.6 [dcl.constexpr] paragraph 3 and move the deleted "." to the preceding sub-bullet:
every constructor call and implicit conversion used in
initializing the return value (8.7.4 [stmt.return],
9.4 [dcl.init]) shall be one of those allowed in a constant
expression (7.7 [expr.const]).
Delete the final bullet of 9.2.6 [dcl.constexpr] paragraph 4 and change the preceding bullet as follows:
every assignment-expression that is an
initializer-clause appearing directly or indirectly within a
brace-or-equal-initializer for a non-static data member that is not
named by a mem-initializer-id shall be a constant expression;
and.
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.