This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-12-20
[Adopted at the February, 2016 meeting.]
According to 14.5 [except.spec] paragraph 1,
In anoexcept-specification,theconstant-expression, if supplied, shall be aconstant expression (7.7 [expr.const]) that iscontextually converted to bool (7.3 [conv]).
This allows the expression to have any type that can be convertedtobool, which is too lenient; it should instead say somethinglike “a converted constant expression of typebool(7.7 [expr.const]).” This would include theconversion tobool in the determination of whether theexpression is constant or not and would also disallow narrowingconversions.
A similar consideration applies tostatic_assert(9.1 [dcl.pre] paragraph 6), which should probably berecast to something like, “an expression that is a constantexpression (7.7 [expr.const]) after contextual conversiontobool (7.3 [conv]).”
Proposed resolution (September, 2015):
Change 7.7 [expr.const] paragraph 4 as follows:
...binds directly. [Note: such expressions may be used in newexpressions (7.6.2.8 [expr.new]), as case expressions(8.5.3 [stmt.switch]), as enumerator initializers if the underlyingtype is fixed (9.8.1 [dcl.enum]), as array bounds(9.3.4.5 [dcl.array]), and as non-type template arguments(13.4 [temp.arg]). —end note]Acontextuallyconverted constant expression of typebool is an expression,contextually converted tobool (7.3 [conv]),where the converted expression is a constant expression and the conversionsequence contains only the conversions above.
Change 9.1 [dcl.pre] paragraph 6 as follows:
In astatic_assert-declaration,theconstant-expression shall be acontextually convertedconstant expressionof typebool(7.7 [expr.const])that can be contextually convertedtobool (7.3 [conv]). If the value of theexpression when so converted istrue...
Change 14.5 [except.spec] paragraph 1 as follows:
In anoexcept-specification, theconstant-expression, ifsupplied, shall be acontextually converted constant expressionof typebool (7.7 [expr.const])that iscontextually converted tobool (7.3 [conv]). A( token thatfollowsnoexcept...