Created on 2013-08-13.00:00:00 last changed 81 months ago
[Moved to DR at the February, 2014 meeting.]
Proposed resolution (September, 2013):
Change 14.5 [except.spec] paragraph 1 as follows:
...In a noexcept-specification, the constant-expression, if supplied, shall be a constant expression (7.7 [expr.const]) that is contextually converted to bool (Clause 7.3 [conv]). A noexcept-specification noexcept is equivalent to noexcept(
There is an ambiguity between a noexcept specifier's optional parenthesized constant-expression and an initializer:
void f() noexcept; void (*p)() noexcept (&f);
Here, we can just about make 9.3.3 [dcl.ambig.res] paragraph 1's rule fit, and say that the (&f) is part of the exception-specification rather than being an initializer. However, this case is much more problematic:
void (*fp2)() noexcept, (*fp)() noexcept (fp2 = 0);
The (fp = 0) here is unambiguously an initializer, because an assignment-expression cannot syntactically be a constant-expression, although current implementations treat it as an ill-formed part of the exception-specification.
Probably the best approach would be to change 14.5 [except.spec] to say that a ( following noexcept is always treated as being part of the noexcept-specification.
|2014-11-24 00:00:00||admin||set||status: dr -> c++14|
|2014-03-03 00:00:00||admin||set||messages: + msg4970|
|2014-03-03 00:00:00||admin||set||status: ready -> dr|
|2013-10-14 00:00:00||admin||set||messages: + msg4605|
|2013-10-14 00:00:00||admin||set||status: open -> ready|