Using std::endian
from C++20 allows us to drop some amount of own code, including infra in the build system (which means we don’t have to port and review it for CMake, only to delete it shortly after switching to C++20).
Note that C++23 would take this even further, with the introduction of std::byteswap
.