30 explicit scoped_ptr(T *ptr =
nullptr, Deleter deleter = Deleter())
31 : ptr_(ptr), deleter_(deleter) {}
42 : ptr_(other.ptr_), deleter_(other.deleter_) {
51 deleter_ = other.deleter_;
59 T *operator->()
const {
return ptr_; }
62 T &operator*()
const {
return *ptr_; }
65 T *get()
const {
return ptr_; }
68 explicit operator bool()
const noexcept {
return ptr_ !=
nullptr; }
71 bool operator!()
const noexcept {
return ptr_ ==
nullptr; }
74 void reset(T *ptr =
nullptr) {