fix warning: 'auto_ptr' is deprecated