C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Implementing a movable container for immovable objects: std::box<T>

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Sun, 15 Dec 2024 00:01:53 +0100
A consuming move is called a relocation in C++. See Relocating prvalues: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2785r3.html Nontrivial Relocation via a New owning reference Type: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2839r0.html There are also some papers about trivial relocatability. -----Ursprüngliche Nachricht----- Von:Oskars Putans via Std-Proposals <std-proposals_at_[hidden]> Gesendet:Sa 14.12.2024 23:40 Betreff:Re: [std-proposals] Implementing a movable container for immovable objects: std::box<T> An:Ivan Matek <libbooze_at_[hidden]>; CC:Oskars Putans <o.putaans_at_[hidden]>; std-proposals_at_[hidden]; Because Rust has move semantics defined in a way that consumes the object, it inherently works better and C++ won't ever be able to reproduce this without some major core changes which I can't even imagine.

Received on 2024-12-14 23:03:56