Relative Content

Tag Archive for c++reinterpret-cast

Clarification on Undefined Behavior Surrounding reinterpret_cast

I’ve done a lot of reading recently on reinterpret_cast as I want to ensure I’m using it correctly and not accidentally invoking undefined behavior. I feel like cppreference and this great writeup on strict aliasing has me 95% of the way there, but I wanted some clarification on my understanding of what is, and is not UB.