auto_ptr的不足
摘要:
一开始还发现这货挺方便的.后来才发现还是不行,多引用时,就会重复删除了#include <iostream>#include <memory>using namespace std;void func(const auto_ptr<int>& pInt){ cout << *pInt<<endl;}class X{public: X(){cout <<"construct"<<endl;} ~ X(){cout <<"destructor"<&l 阅读全文
posted @ 2013-03-24 23:47 Orz.. 阅读(213) 评论(0) 推荐(0)
浙公网安备 33010602011771号