C++ Logo

std-proposals

Advanced search

Re: [std-proposals] User-Defined Trivial Constructors

From: Peter Bindels <dascandy_at_[hidden]>
Date: Sat, 10 Jan 2026 19:24:22 +0100
Hi,

On Sat, Jan 10, 2026 at 7:00 PM Jody Hagins <coachhagins_at_[hidden]> wrote:

> Yes, Peter, your summary is correct, except that the "do nothing trivial
> constructor" can be called, but likely won't.
>
> Could you point me to what clarified it for you so I can incorporate it
> into the paper?
>

As Jonathan also said, the analogy does not help. The example helps, and
the clarifications on exactly what the language says about implicit
lifetime objects. In particular:

>> Trivial lifetime objects are those where the constructor can be skipped.

> Not quite. An implicit-lifetime type is one where there EXISTS at least
one trivial construction path.

>> Guaranteed initialization means the constructor can never be skipped.

> Not from the compiler's perspective. Consider:

Best regards,
Peter

Received on 2026-01-10 18:24:35