I was going through the auto_ptr documentati开发者_StackOverflow社区on on this link auto_ptr There is something which i could not fully understand why is it done. In the interface section there are tw
auto_ptr_ref documentation heresays this This is an instrumental class to allow certain conversions that allow auto_ptr objects to be passed to and returned from functions.
I have a class like this: class Inner; class Cont { public: Cont(); virtual ~Cont(); private: Inner* m_inner;
I initialize an auto_ptr to NULL and later in the game I need to know if it has NULL or not to return it or a new copy.