backup
This commit is contained in:
@@ -6,9 +6,24 @@
|
||||
namespace TinySTL{
|
||||
template<class T>
|
||||
class cow_ptr{
|
||||
public:
|
||||
typedef T element_type;
|
||||
public:
|
||||
explicit cow_ptr(T *p = nullptr);
|
||||
template<class D>
|
||||
cow_ptr(T *p, D d);
|
||||
|
||||
cow_ptr(const cow_ptr& cp);
|
||||
cow_ptr& operator = (const cow_ptr& cp);
|
||||
|
||||
element_type operator *()const;
|
||||
element_type *operator ->()const;
|
||||
private:
|
||||
shared_ptr<T> ptr_;
|
||||
shared_ptr<element_type> ptr_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#include "Detail\COWPtr.impl.h"
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user