|
Boost Users : |
Subject: Re: [Boost-users] Safe to pass dereferenced anonymous shared_ptr?
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2013-11-06 05:50:12
2013/11/6 Krzysztof Czainski <1czajnik_at_[hidden]>
> 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...
>
Or maybe return a boost::container::vector<char> in C++98? It's movable,
you know ;-)
HTH,
Kris
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net