
17 Apr
2009
17 Apr
'09
6:41 p.m.
Sebastian Redl wrote:
Alexander Terekhov wrote:
To repeat:
noexcept void f() { throw 0; }
is supposed to be ill-formed versus well-formed
noexcept void f() { noexcept { throw 0; } }
invoking undefined behaviour.
My point is that both forms shall be well-formed with defined behaviour: invocation of unexpected() at throw point.
What's the point of the noexcept block then?
To have noexcept blocks in addition to functions. void f() { ... noexcept { std::cout << __func__; } ... } regards, alexander.