From 39b0cb9afeb53e9a1720bad64347e72d318c554a Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 3 Jun 2009 17:26:57 +0200 Subject: replacing 1xtab with 2xspace implementing array --- ue5/shared_ptr.hpp | 99 +++++++++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 49 deletions(-) (limited to 'ue5/shared_ptr.hpp') diff --git a/ue5/shared_ptr.hpp b/ue5/shared_ptr.hpp index 87e4b01..4492fff 100644 --- a/ue5/shared_ptr.hpp +++ b/ue5/shared_ptr.hpp @@ -8,78 +8,79 @@ namespace Ti { -/* TODO helpers */ + /* TODO helpers */ -template -class shared_ptr -{ -private: - /* TODO data */ + template + class shared_ptr + { + private: + /* TODO data */ -public: - shared_ptr(); - T* get() const; - shared_ptr (const shared_ptr& other); + public: + shared_ptr(); + T* get() const; + shared_ptr (const shared_ptr& other); - template - shared_ptr (const shared_ptr& other); + template + shared_ptr (const shared_ptr& other); - template - explicit shared_ptr (O* p); - shared_ptr& operator = (const shared_ptr& other); + template + explicit shared_ptr (O* p); + shared_ptr& operator = (const shared_ptr& other); - template - shared_ptr& operator = (const shared_ptr& other); + template + shared_ptr& operator = (const shared_ptr& other); - ~shared_ptr (); - T& operator * () const; - T* operator -> () const; + ~shared_ptr (); + T& operator * () const; + T* operator -> () const; - void swap (shared_ptr& other); + void swap (shared_ptr& other); - inline void reset(); + inline void reset(); -private: - template - friend shared_ptr make_shared (Args...); + private: + template + friend shared_ptr make_shared (Args...); - template - friend bool operator == (const shared_ptr& a, const shared_ptr& b); + template + friend bool operator == (const shared_ptr& a, const shared_ptr& b); - template - friend bool operator == (const shared_ptr& a, const U2* b); + template + friend bool operator == (const shared_ptr& a, const U2* b); - template - friend bool operator == (const U1* a, const shared_ptr& b); + template + friend bool operator == (const U1* a, const shared_ptr& b); - template - friend bool operator != (const shared_ptr& a, const U2* b); + template + friend bool operator != (const shared_ptr& a, const U2* b); - template - friend bool operator != (const U1* a, const shared_ptr& b); + template + friend bool operator != (const U1* a, const shared_ptr& b); - template - friend bool operator != (const shared_ptr& a, const shared_ptr& b); + template + friend bool operator != (const shared_ptr& a, const shared_ptr& b); - template - friend shared_ptr shared_dynamic_cast (const shared_ptr& from); -}; + template + friend shared_ptr shared_dynamic_cast (const shared_ptr& from); + }; -template -shared_ptr make_shared (/* TODO */); + template + shared_ptr make_shared (/* TODO */); - -template -shared_ptr shared_dynamic_cast (const shared_ptr& from); + template + shared_ptr shared_dynamic_cast (const shared_ptr& from); } // end namespace ti namespace std { - using namespace Ti; - template - inline void swap (shared_ptr& t1, shared_ptr& t2); - /* TODO */ + using namespace Ti; + template + inline void swap (shared_ptr& t1, shared_ptr& t2); + /* TODO */ } #endif + +/* vim: set et sw=2 ts=2: */ -- cgit v1.2.3