make_shared underused

Ashod Nakashian ashnakash at gmail.com
Mon Oct 26 08:47:36 PDT 2015


On Mon, Oct 26, 2015 at 11:10 AM, Miklos Vajna <vmiklos at collabora.co.uk>
wrote:

> On Mon, Oct 26, 2015 at 10:32:02AM -0400, Ashod Nakashian <
> ashnakash at gmail.com> wrote:
> > Is this an unintentional coincidence that we're encouraged to cleanup, or
> > is there a policy as-such?
>
> I don't think it's intentional that std::make_shared is under-used.
> Before introducing new calls to boost::make_shared, it's a good idea to
> check if you can first convert that boost::shared_ptr to std::shared_ptr
> first, and then use std::make_shared, though.
>

Absolutely. I think boost -> std conversions are a given.

Thanks for the clarification. I think it's cleaner and more efficient to
use std::make_shared where possible.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20151026/a45baabb/attachment.html>


More information about the LibreOffice mailing list