53 class shared_ptr :
private shared_ptr_base
63 explicit shared_ptr(T* s)
68 shared_ptr_base::reset_counter();
71 shared_ptr(
const shared_ptr& s)
75 if (shared_ptr_base::is_null())
79 shared_ptr& operator=(
const shared_ptr& s)
85 shared_ptr_base::operator = (s);
86 if (shared_ptr_base::is_null())
92#if __cplusplus >= 201103L
93 shared_ptr& operator=(shared_ptr&& s)
noexcept
108 if (shared_ptr_base::clear_counter())
120 shared_ptr_base::reset_counter();
129 void swap(shared_ptr<T>& s)
134 shared_ptr_base::swap_counter(s);
135 if (shared_ptr_base::is_null())
139 int use_count()
const
141 return shared_ptr_base::get_count();
144 T *operator->()
const
154 operator bool()
const
159 bool operator!()
const