I have used unions earlier comfortably; today I was alarmed when I read this post and came to know that this code
union ARGB { uint32_t colour; str
Technically it's undefined, but in reality most (all?) compilers treat it exactly the same as using a reinterpret_cast from one type to the other, the result of which is implementation defined. I wouldn't lose sleep over your current code.
reinterpret_cast