C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Relocation in C++

From: Maciej Cencora <m.cencora_at_[hidden]>
Date: Tue, 1 Feb 2022 21:54:35 +0100
Sorry about that, I somewhat hijacked this thread with a modified
proposal and I was referring to this modified version, not to the
original proposal.

Regards,
Maciej

wt., 1 lut 2022 o 20:00 Giuseppe D'Angelo via Std-Proposals
<std-proposals_at_[hidden]> napisał(a):
>
> Il 01/02/22 18:02, Sébastien Bini via Std-Proposals ha scritto:
> > Not sure I understand. Why would the compiler decide to destroy
> > other.ptr in the relocation constructor? And having other destructed
> > again is a programming error (like doing: `IntBuffer x; x.~IntPtr();` x
> > is destructed twice) and should not happen. Using the reloc operator
> > guarantees things will be safe.
>
> Apologies for the confusion, I was referring to the scenario where it
> would be a QoI whether a relocated object is considered destroyed or its
> destructor would be ran nevertheless. In such a scenario _a lot_ of
> things start falling apart.
>
> My 2 c,
>
> --
> Giuseppe D'Angelo | giuseppe.dangelo_at_[hidden] | Senior Software Engineer
> KDAB (France) S.A.S., a KDAB Group company
> Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
> KDAB - The Qt, C++ and OpenGL Experts
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2022-02-01 20:54:55