Jump to content

  • Log In with Google      Sign In   
  • Create Account


Inline try/catch


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
21 replies to this topic

#21 SiCrane   Moderators   -  Reputation: 9157

Like
0Likes
Like

Posted 21 August 2013 - 09:45 AM

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.



Sponsor:

#22 l0calh05t   Members   -  Reputation: 580

Like
0Likes
Like

Posted 21 August 2013 - 04:40 PM

 

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS