Modifying a const constructed object after a const_cast is UB (I believe due to constant propagation). Is it still UB even when combined with std::launder (which AFAIK prevents some optimizations such as const propagation)?
#include <new>
#include <iostream>
struct C
{
int i;
};
int main(const int argc, const char * const * const argv)
{
const C c{1};
auto x = std::launder(const_cast<C*>(&c));
++x->i;
std::cout << x->i << std::endl;
std::cout << c.i << std::endl;
return 0;
}