提交 88eab111 编写于 作者: 邹晓航

添加friend class 关系

上级 2337187e
......@@ -6,6 +6,10 @@
#include "Detail\Ref.h"
namespace TinySTL{
template<class _T>
class cow_ptr;
template<class T>
struct default_delete{
void operator ()(T* ptr){ if(ptr) delete ptr; }
......@@ -150,6 +154,10 @@ namespace TinySTL{
}
private:
ref_t<T> *ref_;
public:
template<class _T>
friend class cow_ptr;
};
template<class T1, class T2>
bool operator == (const shared_ptr<T1>& lhs, const shared_ptr<T2>& rhs){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册