C++ Logo


Advanced search

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

From: Giuseppe D'Angelo <giuseppe.dangelo_at_[hidden]>
Date: Sat, 30 Apr 2022 17:19:17 +0200
On 30/04/2022 16:34, William Linkmeyer wrote:
> Giuseppe wrote:
>> (From a syntax point of view, I'm not sure how that is desirable, as one could no longer something like `other = reloc obj; delete &obj;`, but I don't think it's a particularly compelling use case...)
> I would argue that the example given*is* a compelling use case for reloc. Remembering to delete objects (esp. at the right time) is a recipe for disaster.

My example was about a use case for which one does need to use the name
of the relocated object. I was just not sure about how realistic it is.
The example had nothing to do with "remembering to delete", we have
smart pointers and other strategies for that.

> Anyway, for what it’s worth, I think this is a compelling paper and would like to help move it forward in a constructive way.

The above point wasn't my main criticism. My main criticism was that the
paper seems to settle on a convoluted syntax for the already existing
move semantics (plus the p1144 bits). Did I misunderstand something?

Giuseppe D'Angelo

Received on 2022-04-30 15:19:20