Some of my colleagues prefer to explicitly initialize std::auto_ptr
to 0
in constructor initialization list, but it will be initialized to 0
in it's constructor without any explicit initialization. So is there any reason to do it?
#include <memory>
class A
{
A() : SomePtr(0)
{
}
private:
std::auto_ptr<SomeType> SomePtr;
};