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
The implementation of class template proxy currently uses char arrays for in-place object construction. While functional, accessing the underlying object leads to UB. We propose changing the element type to std::byte for improved readability and alignment with C++ standards.
Such in-place-new ends the lifetime of the enclosing complete object and the nested objects that overlap with the newly created object due to [basic.life]/1.5. And then any further non-static member function invocation, including destruction, on such an enclosing object (e.g. a proxy object) will be UB as per [basic.life]/6.2 and /7.2.
The implementation of class template
proxycurrently uses char arrays for in-place object construction. While functional, accessing the underlying object leads to UB. We propose changing the element type tostd::bytefor improved readability and alignment with C++ standards.According to @frederick-vs-ja: