摘要:
以下代码摘录自MoreEffective C++auto_ptr.h#ifndef AUTO_PTR_H#define AUTO_PTR_Htemplate<typename T>class auto_ptr{ public : //使用explicit关键字避免隐式转换 explicit auto_ptr(T* p=0); ~auto_ptr(); //使用另一个类型兼容的auto_ptr来初始化一个新的auto_ptr template<typename U> auto_ptr(auto_ptr<U>... 阅读全文
posted @ 2012-08-31 01:15
_Lei
阅读(2152)
评论(1)
推荐(0)


浙公网安备 33010602011771号