Junior — Senior
Class with smart pointer and adherence to the five rule
livecode
Task condition
It is necessary to implement a class that contains an object of type std::shared_ptr. The full rule of five must be implemented: user-defined copy constructor, copy assignment operator, move constructor, move assignment operator, and destructor.
class MyClass {
std::shared_ptr<int> data;
public:
// rule of five
};