添加friend class 关系

This commit is contained in:
邹晓航
2015-03-16 15:13:59 +08:00
parent 2337187e8a
commit 88eab11155

View File

@@ -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){