Implementation of std::shared_ptr template class