initializing functions as auto_ptr with class reference

107 views Asked by At

I'm trying to understand the flow of a code and I came across this code snippet in the header file

typedef std::auto_ptr<Client> auto_ptr_t;

static Client::auto_ptr_t open(const std::string& uri, const std::string& user, const std::string& pass);

Client& open();

where Client is a class and open is some auto pointer function which authenticates client server link. I don't understand two things

  1. why initialize open() as a auto_ptr and what does it mean?
  2. what would client& open() do?

Can someone explain why has it been initialized this way

0

There are 0 answers