3 ms·
1. You still need std::launder in that case. 2. It doesn't initialize the object that is implicitly created, even if the storage has initialized chars.
by leni536 5mo ago
1. You still need std::launder in that case.
2. It doesn't initialize the object that is implicitly created, even if the storage has initialized chars.
- denotational 5mo agoThe paper that introduced the implicit lifetime mechanism suggests that std::launder is not required: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p0593r6.html#practical-examples https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p05....