2013/11/6 Scott Mueller <smueller@osisoft.com>
I have just one comment. I would recommend returning a unique_ptr instead of a shared_ptr, as you can then use the object as a unique_ptr, be move it into a shared_ptr, or adopt it by other means elsewhere in your data structures. Returning a shared_ptr locks you into keeping the data as a shared_ptr.

Best Regards,

M. Scott Mueller

If you're in C++11, why would you use a pointer at all and not return a string? It's movable.

If you're not in C++11, then consider returning by value anyway. RVO will most likely avoid the copy anyway. That said, (I wish unique_ptr emulation was in boost) I get it why use shared_ptr even though you don't share anything...

Regards,
Kris