reinterpret_cast between char* and std::uint8_t* – safe?
Ok, let’s get truly pedantic. After reading this, this and this, I’m pretty confident that I understand the intention behind both Standards. So, doing reinterpret_cast from std::uint8_t* to char* and then dereferencing the resulting pointer is safe and portable and is explicitly permitted by [basic.lval]. However, doing reinterpret_cast from char* to std::uint8_t* and then dereferencing … Read more