logoalt Hacker News

What happens when a destructor throws

23 pointsby jandeboevrielast Thursday at 3:40 PM17 commentsview on HN

Comments

avalystoday at 3:15 AM

Don’t know who this guy is, but I’m glad I never interviewed with him. This is language-version-specific behavioral minutiae that anyone can look up in 5 minutes in the rare case it matters, and is otherwise irrelevant to engineering software at a senior level.

This article is a junior engineer’s idea of what a senior engineer should know.

show 4 replies
NooneAtAll3today at 2:51 AM

I... I did not expect that noexcept(false) works on destructors

zarzavattoday at 3:40 AM

There's nothing essential to know about what happens when a destructor throws other than it's bad and don't do it. Especially if the effect is to terminate.

I hate this style of interviewing which is more about the interviewer feeling good about themselves rather than doing their job and assessing candidates. Just wastes everyone's time all around.

supliminaltoday at 2:44 AM

No mention of vtables or thunks? We decided to proceed with another candidate.