討論串[問題] auto_ptr_ref的功用
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
不是的,auto_ptr_ref 並不是用在這種地方。. 想像以下的程式碼:. auto_ptr<int> foo();. void bar(). {. .... auto_ptr<int> p_base = foo();. }. foo() 回傳的是一個暫時物件,但 auto_ptr 的 copy
(還有1115個字)
內容預覽:
請問auto_ptr的實作中為什麼要多定義. auto_ptr(auto_ptr_ref<T> rhs) throw() : ap(rhs.yp) {. }. auto_ptr& operator= (auto_ptr_ref<T> rhs) throw() { // new. reset(rhs.
(還有191個字)
首頁
上一頁
1
下一頁
尾頁