Can you not ensure the buffer is suitably aligned? And then just
reinterpret_cast
. People will grumble about the lifetimes, but as long as the bytes come from an opaque source, this will never break.