Inline try/catch

Started by
18 comments, last by l0calh05t 10 years, 7 months ago

Since all guarantees go out of the window if you throw in the destructor it is a *good thing* that destructors are marked noexcept, that way you have a guarantee that terminate is called, which I'll take over all kinds of undefined behavior (which throwing in the destructor will cause when used in conjunction with pretty much any library class or template which doesn't expect that... which includes all standard containers) any day.

I don't see where you get the idea that I'm saying that the implicit noexcept specification is a not a good thing. "It's sufficiently bad" as a connecting clause here means that the previously mentioned is so very bad that the part after the "sufficiently bad" clause is a step taken to help mitigate the badness. In other words a good thing. Another example: there are a lot of rapes in this area. It's sufficiently bad that the city has doubled the number of police patrols in the area. Rapes = bad thing. More police patrols = good thing that is done to reduce the problems of the bad thing.

Advertisement

Since all guarantees go out of the window if you throw in the destructor it is a *good thing* that destructors are marked noexcept, that way you have a guarantee that terminate is called, which I'll take over all kinds of undefined behavior (which throwing in the destructor will cause when used in conjunction with pretty much any library class or template which doesn't expect that... which includes all standard containers) any day.

I don't see where you get the idea that I'm saying that the implicit noexcept specification is a not a good thing. "It's sufficiently bad" as a connecting clause here means that the previously mentioned is so very bad that the part after the "sufficiently bad" clause is a step taken to help mitigate the badness. In other words a good thing. Another example: there are a lot of rapes in this area. It's sufficiently bad that the city has doubled the number of police patrols in the area. Rapes = bad thing. More police patrols = good thing that is done to reduce the problems of the bad thing.

Ah, sorry, I basically read it as in "It's bad enough (sufficiently bad) that they did this, but even worse...". And going by samoth's post I'm not the only one to have understood it that way.

This topic is closed to new replies.

Advertisement