diff --git a/TinySTL/Memory.h b/TinySTL/Memory.h index a259797520ee707c048a29ffd858f2b6c8ca63de..cf2da311b9a2dbace4473f2c703cf714226d949a 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){