19 Aug
2009
19 Aug
'09
3:10 p.m.
Hi All, //////In short: If I have a templated class A<T>, within it, I want to typedef shared_ptr to it self, should I write: typedef shared_ptr< A<T> > PointerType; or typedef shared_ptr< A > PointerType; ? //////In more detail I have: template< typename T> class A { public: typedef shared_ptr< A<T> > PointerType; // or typedef shared_ptr< A > PointerType; // Further more static PointerType New() { return PointerType(new A<T>); // or return PointerType(new A); } }; Could I know if there's difference in between? Thanks! Yi Gao