Re: How on earth did noexcept get through the standards process?
Am 31.03.2011 19:50, schrieb Alexander Terekhov:
"Martin B." wrote:
[... quoting Danny Kalev ...]
How Does noexcept Differ from throw()?
... the proposal requires that in the
event of a noexcept violation, the
implementation shall call terminate() ...
More specifically, the implementation
shall *not* invoke local objects'
destructors if a noexcept violation has
occurred.
Uhm, "shall *not*" would mean a defined behaviour (and rightfully so).
Sadly, I've heard that a noexcept violation merely triggers undefined
behaviour. It means "may not" instead of "shall not" and it makes
noexcept quite defective in my view.
While the initial noexcept specification had indeed suggested to make
such violations undefined behaviour, this particular suggestion became
rejected during the Pittsburgh meeting and the revised proposal
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html
became accepted instead. Since then the noexcept-related wording has
undergone only minor changes and in particular the effects of violating
a noexcept exception-specifications are still well-defined to invoke
std::terminate.
HTH & Greetings from Bremen,
Daniel Kr?gler
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]