Hacker News new | ask | show | jobs
by wavemode 10 days ago
Rule-of-zero classes don't need regular constructors either, since you can just aggregate-initialize them.

If more logic surrounding their construction is needed, you can use factory functions.

1 comments

You said it better than I did. What I tried to say (and failed) was that there's a style of C++ application code that doesn't need to do any of it: no constructors, assignments, or destructor. Sometimes library code needs those though.