This is an attempt to fix PR15481.
noexcept operator currently ignores whether given call is a constant expression. The patch adds a check whether given call expression is a constant expression. If so, canCalleeThrow returns CT_Cannot.
Differential D538
C++11: noexcept should check whether the expression is a constant expression ismailp on Mar 13 2013, 8:15 AM. Authored by
Details
This is an attempt to fix PR15481. noexcept operator currently ignores whether given call is a constant expression. The patch adds a check whether given call expression is a constant expression. If so, canCalleeThrow returns CT_Cannot.
Diff Detail Event TimelineComment Actions Generally speaking, I'd prefer for us to implement the resolution of core issue 1351 rather than patching up our implementation of the broken C++11 rules. However, even the core issue 1351 rules are broken when the callee is a function pointer...
Comment Actions I have read the resolution for the issue 1351, and I was curious about aligning this with the removal of dynamic exception specifications as well. Could you please confirm whether I understood this part correctly; given the example in issue 1351, in the move constructor declaration, "noexcept" is represented with an empty set: Could you please explain the purpose of having throw(E) and noexcept on the same declarator? I understand throw(E) and noexcept(false) would be compatible. |
This is not right. We should try to evaluate the call even if we can't resolve it to a particular declaration.