Re:My favourite C++ footgun
by cglodt on Wednesday June 23, 2021 @02:04AM
(#27601282)
Throwing from a constructor is a fundamental way to make it impossible to construct invalid instances of a class. It's great, especially for immutable classes. Throwing from constructor + immutability = no invalid states ever.
[ Parent
| on HN ]
There are no comments on this comment yet.