1 namespace std { 2 3 template <typename type> 4 class shared_ptr { 5 public: 6 shared_ptr(); 7 shared_ptr(type *ptr); shared_ptr(const shared_ptr<type> & t)8 shared_ptr(const shared_ptr<type> &t) {} shared_ptr(shared_ptr<type> && t)9 shared_ptr(shared_ptr<type> &&t) {} 10 ~shared_ptr(); 11 type &operator*() { return *ptr; } 12 type *operator->() { return ptr; } 13 type *release(); 14 void reset(); 15 void reset(type *pt); 16 shared_ptr &operator=(shared_ptr &&); 17 template <typename T> 18 shared_ptr &operator=(shared_ptr<T> &&); 19 20 private: 21 type *ptr; 22 }; 23 24 } // namespace std 25