跳到主要内容

std::auto_ptr<T>::operator*, std::auto_ptr<T>::operator->

C++11 中已弃用,C++17 中已移除
T& operator*() const throw();   (1)
T* operator->() const throw(); (2)

解引用指向所管理对象的指针。第一个版本要求 get() != 0

参数

(无)

返回值

  1. *get()
  2. get().

std::auto_ptr<T>::operator*, std::auto_ptr<T>::operator->

C++11 中已弃用,C++17 中已移除
T& operator*() const throw();   (1)
T* operator->() const throw(); (2)

解引用指向所管理对象的指针。第一个版本要求 get() != 0

参数

(无)

返回值

  1. *get()
  2. get().