Screenplay: C++: Smart Pointers¶
copy structure and data.h from code/. start with empty test.
fuzzy ownership. “one has to know who’s owner”
std::shared_ptr: gradually transform.
“no known conversion” -> explain implicit conversion vs.
SharedDataOwnerctor signature has
std::shared_ptr<>in it. one solution is to implicitly take ownership, by accepting
Data*. this is no win in readability/maintainability!
PDF slides: move