Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 27s8 days 9 hours 54 minutes 27 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 27s8 days 9 hours 54 minutes 27 seconds.

Sign in to watch this lesson
Ownership Types, Views and Type Erasure · 3:44
Pimpl (pointer to implementation) moves a class's data members and their includes out of the header and behind a unique_ptr, so the class shrinks to one pointer and clients stop recompiling when its insides change. We watch the client fail to compile because the implicit destructor is generated where Impl is only a name, then fix it by declaring the destructor and moves in the header and defining them in the .cpp, write a deep copy, and see why shared_ptr doesn't have the problem.