C++ Logo

std-proposals

Advanced search

Re: [std-proposals] is_trivially_copyable_in_reality

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Sat, 24 Jan 2026 14:22:39 +0000
On Saturday, January 24, 2026, Thiago Macieira wrote:

>
> And it's only worse when we consider you want it to be non-cross-platform.
> I think that's a DOA request.
>
>

The term you seek is "implementation-specific behaviour".

So the Standard would say something like:

    === is_trivially_copy_constructible ===

    - For polymorphic objects, trait will always be false if the following
expression is false: 'is_final_v<T> || guaranteed_complete_object'.
    - For polymorphic objects, trait will be implementation-defined if the
following expression is true: 'is_final_v<T> || guaranteed_complete_object'.

But that's only if we don't also introduce "std::copy_lifetime". If we
introduce "std::copy_lifetime" then the trait can be defined as:

    === is_trivially_copy_constructible ===

    - For polymorphic objects, trait will evaluate to 'is_final_v<T> ||
guaranteed_complete_object'

And so then "std::copy_lifetime" will be a no-op on every machine except
for arm64e. On arm64e it will re-sign the vptr and vbptrs.

Received on 2026-01-24 14:22:41