You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Full name of submitter (unless configured in github; will be published with the issue): Jim X
[intro.object] p3 says
If a complete object is created ([expr.new]) in storage associated with another object e of type “array of N unsigned char” or of type “array of N std::byte” ([cstddef.syn]), that array provides storage for the created object if:
the lifetime of e has begun and not ended, and
the storage for the new object fits entirely within e, and
there is no array object that satisfies these constraints nested within e.
No bullet in the list explicitly mentions the alignment requirement of the object being created. [basic.life] p1 says
The lifetime of an object of type T begins when:
storage with the proper alignment and size for type T is obtained, and
The array with the element of type unsigned char or std::byte has the weakest alignment requirement per [basic.align] p6 and [expr.alignof] p3. That is, the storage provided by the array is not necessary to satisfy the alignment requirement of the object being created.