This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: std::shared_ptr vs allocators: by value or by const ref?!?
On 10/08/2010 01:38 PM, Jonathan Wakely wrote:
> The reset() inconsistency is probably my fault. At one point I
> experimented with passing them by reference, so maybe I missed that
> one and it got committed. I think I chose to pass by const-ref
> internally, because I couldn't see any reason not to.
>
By the way, I reported our current status incorrectly / incompletely:
our shared_ptr constructors also already use const ref. The only
exception is allocate_shared and the __shared_ptr stuff. Thus, we have
definitely to do something in v3, very likely just change everything to
const ref. I have the straightforward patch ready.
Paolo.