I just want to add that after much research, I've come to the conclusion that there is no way currently to write a constexpr offset() in C++ (at least with version 20 and below, no clue about the next version), as crazy as it might sound…
No solutions suggested above actually work because they all use reinterpret_cast which is forbidden in constexpr. Edit : and to be more specific, c style cast (raw cast) equivalent to reinterpret_cast are forbidden too, quite obviously…