Date: Thu, 29 Jan 2026 21:48:41 +0000
On Thu, Jan 29, 2026 at 4:37 PM Thiago Macieira wrote:
>
> Right now, we don't need to do anything because no polymorphic
> object can be trivially copied.
This one can:
struct Donkey final {
~Donkey(void) noexcept = default;
int n;
};
Are you making a distinction between "The Standard says it cannot be
trivially copied" and "In actual fact it cannot be trivially copied"?
Because these are two different things. According to the Standard, no
polymorphic object can be trivially copied. However in reality, on
every implementations except for arm64e, the vast majority of
polymorphic objects can be trivially copied so long as they're either
'final' or guaranteed to be the complete object.
>
> Right now, we don't need to do anything because no polymorphic
> object can be trivially copied.
This one can:
struct Donkey final {
~Donkey(void) noexcept = default;
int n;
};
Are you making a distinction between "The Standard says it cannot be
trivially copied" and "In actual fact it cannot be trivially copied"?
Because these are two different things. According to the Standard, no
polymorphic object can be trivially copied. However in reality, on
every implementations except for arm64e, the vast majority of
polymorphic objects can be trivially copied so long as they're either
'final' or guaranteed to be the complete object.
Received on 2026-01-29 21:47:38
