What does std::make_shared<Object>("foo")
do?
std::shared_ptr<Object> p1 = std::make_shared<Object>("foo");
I know that std::make_shared<T>
is template class and I could understand Object("foo")
is a temporary object indeed. But I could not understand std::make_shared<Object>("foo")
.
Can someone explain me, step by step, sequence of objects created and operations done by it?