C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Replace an object -- but retain old object if new object fails to construct

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Wed, 29 Oct 2025 15:14:39 +0100
Another possibility is not to allow memcpy/memmove for trivially relocatable objects, but only make it work over relocation functions and keyword. Then memcpy/memmove don't have special behavior, but you are also not to allowed to assume byte identity or copy/move manually. -----Ursprüngliche Nachricht----- Von:Frederick Virchanza Gotham via Std-Proposals <std-proposals_at_[hidden]> Gesendet:Mi 29.10.2025 15:16 Betreff:Re: [std-proposals] Replace an object -- but retain old object if new object fails to construct An:std-proposals_at_[hidden]; CC:Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>; On Wed, Oct 29, 2025 at 2:05 PM Sebastian Wittmeier wrote: > I really hope nobody suggests that 'memcpy' or 'memmove' shall have special behaviour when the object being relocated is polymorphic . . . . I really hope nobody goes there.

Received on 2025-10-29 14:27:53