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
- why initialize open() as a auto_ptr and what does it mean?
- what would client& open() do?
Can someone explain why has it been initialized this way