C++ Logo

std-discussion

Advanced search

Re: Making the new expression smart

From: Richard Hodges <hodges.r_at_[hidden]>
Date: Thu, 17 Sep 2020 21:13:30 +0200
On Thu, 17 Sep 2020 at 19:08, Christopher Head via Std-Discussion <
std-discussion_at_[hidden]> wrote:

> On Thu, 17 Sep 2020 18:26:05 +0200
>
> Richard Hodges via Std-Discussion <std-discussion_at_[hidden]>
>
> wrote:
>
>
>
> > For what it's worth, shared_ptr is move constructible from unique_ptr.
>
>
>
> Fair point, though it still presumably loses you the
>
> single-heap-allocation benefit of std::make_shared.
>

In this case, yes. But then so does initialising a shared_ptr with a naked
pointer, so nothing would be lost.


> --
>
> Christopher Head
>
> --
>
> Std-Discussion mailing list
>
> Std-Discussion_at_[hidden]
>
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>
> --
Richard Hodges
hodges.r_at_[hidden]
office: +442032898513
home: +376841522
mobile: +376380212

Received on 2020-09-17 14:13:45