This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
[Voted into the WP at the March, 2011 meeting as part of paper N3277.]
9.2.6 [dcl.constexpr] paragraph 3 is overly restrictive in requiring that reference parameter and return types of a constexpr function or constructor must refer to a literal type. 7.7 [expr.const] paragraph 2 already prevents any problematic uses of lvalues of non-literal types, and it permits use of pointers to non-literal types as address constants. The same should be permitted via reference parameters and return types of constexpr functions.
(See also issue 1194.)
Proposed resolution (November, 2010):
Change 6.8 [basic.types] paragraph 10 as follows:
A type is a literal type if it is:
a scalar type; or
a reference type; or
...
Change 9.2.6 [dcl.constexpr] paragraph 3 as follows:
The definition of a constexpr function shall satisfy the following constraints:
it shall not be virtual (11.7.3 [class.virtual])
its return type shall be a literal type
or a reference to literal typeeach of its parameter types shall be a literal type
or a reference to literal type...
Change 9.2.6 [dcl.constexpr] paragraph 4 as follows:
The definition of a constexpr constructor shall satisfy the following constraints:
each of its parameter types shall be a literal type
or a reference to literal type;...