Looks legit - the
p
and cast-to arrays are similar types per "they are both arrays and the array element types are similar" (see
cppreference), so not an aliasing violation. Still not nice that most C++ programmers doing a code review would have to look that up before trusting the code.... —
Tony Delroy 1 min ago