diff --git a/TinySTL/Memory.h b/TinySTL/Memory.h index a259797..cf2da31 100644 --- a/TinySTL/Memory.h +++ b/TinySTL/Memory.h @@ -6,6 +6,10 @@ #include "Detail\Ref.h" namespace TinySTL{ + template + class cow_ptr; + + template struct default_delete{ void operator ()(T* ptr){ if(ptr) delete ptr; } @@ -150,6 +154,10 @@ namespace TinySTL{ } private: ref_t *ref_; + + public: + template + friend class cow_ptr; }; template bool operator == (const shared_ptr& lhs, const shared_ptr& rhs){