Pointer masters

Pages: 12
That's a hair away from undefined behavior: accessing the same object as two different types only works if one of them is array of char/unsigned char (and for a few other exceptions).
I would explicitly write reinterpret_cast<unsigned char*> to make it clear to the reader that the code is well-defined.
Last edited on
Topic archived. No new replies allowed.
Pages: 12