Sobes.tech
Junior — Senior

Simplest analog of shared_ptr with default constructor

livecode

Task condition

Implement a basic version of a smart pointer that will mimic the behavior of the standard std::shared_ptr. It is important to provide a parameterless constructor that allows creating an empty pointer object.


template<typename T>
class SharedPtr {
    // TODO: implementation
};