Quick Q: How should you use the standard smart pointers as members? -- StackOverflow

From StackOverflow:

Using smart pointers for class members

I'm having trouble understanding the usage of smart pointers as class members in C++11. I have read a lot about smart pointers and I think I do understand how unique_ptr and shared_ptr/weak_ptr work in general. What I don't understand is the real usage. It seems like everybody recommends using unique_ptr as the way to go almost all the time. But how would I implement something like this: ...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.