#include class foo { class impl; std::unique_ptr impl_; public: ~foo(); // Implement (with an empty body) where impl is complete // foo(); // <-- adding this to the example will cause compile to pass again }; int main() { foo bar; return 0; }