As output from one function, I get an object of type Foo. As an argument to another class, I need to pass an object of type std::shared_ptr<Foo>. How can I make the shared pointer from the original object?
As output from one function, I get an object of type Foo . As
Share
This is really quite simple:
Basically, just heap allocate a new
Foo, copying/moving the result into it.