https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122690

--- Comment #4 from Jody Hagins <CoachHagins at gmail dot com> ---
Yes. It was unfortunate that they only mentioned the dtor in the "needs magic"
part.

However, this support is necessary by the definition in the specification
because it mentions nothing about access.

We need an implicit lifetime to have an instance of some type in shared memory,
but we don't really want it ever to be constructed with unspecified bits.

Making the trivial default constructor private means it can't be accidentally
constructed without a specific value. However, since a static or friend could
perform that construction, it could technically happen, so it retains its
implicit lifetime trait, while forcing most/all actual use to employ a
constructor that initializes the bits.

Thanks for working on the patch!

Reply via email to