News for hackers. Stuff that matters.
Re:My favourite C++ footgun by TeMPOraL on Wednesday June 23, 2021 @04:55AM (#27602330)
That's an option, but now you're using a factory method instead of a constructor. It's a valid choice, particularly if you want to go for exception-free style - but GP's main point was that throwing from a constructor is not only not a footgun, it's actually the correct practice if you're writing RAII style.

There are no comments on this comment yet.