For addition or subtraction of two expressions P and Q,
if P or Q have type “pointer to cvT”, where T and the array
element type are not similar ([conv.rval]), the behavior is undefined.
[Example 1: struct S {int i; };
struct T : S {double d; };
void f(const S* s, std::size_t count){for(const S* end = s + count; s != end; ++s){// undefined behavior, T is not similar to S but s points to a T[]/* ... */}}int main(){
T test[5];
f(test, 5);
} — end example]