Remix.run Logo
TuxSH 4 days ago

Alas none of gcc/clang/msvc(?) have implemented start_lifetime_as, so if you want to create an object in-place and obtain a mutable pointer to it, you're stuck with the:

    return std::launder(static_cast<T*>(std::memmove(p, p, sizeof(T))));
trick until they properly implement it. For MMIO, reintepret_cast from integer is most likely fine.