logoalt Hacker News

spacechild1today at 9:44 AM0 repliesview on HN

This is just a simple example, therefore nitpicking on the semantics of the Widget methods is a bit silly.

> 1. Instead of explicitly applying the rule-of-0 with `= default` for the copy&move ctor&assignment and the destructor - just _don't_ write anything:

The blog post explicitly explains why this doesn't work. You have to define these methods in the source file because they need to see the definition of the Impl struct.