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@lists.isocpp.org>
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@lists.isocpp.org;
CC: Frederick Virchanza Gotham <cauldwell.thomas@gmail.com>;
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.