You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[expr.add] p4 defines the concept of pointer arithmetic evaluation
Otherwise, if P points to an array element i of an array object x with n elements...
Which requires we clearly know which element of the array P points to. However, for the pointer arithmetic and comparison purpose, the definition of an object that is not an array element is defined as what [basic.compound] p3 says
an object of type T that is not an array element is considered to belong to an array with one element of type T.
"belong to" is not clear. It is even vague which element of the array is to which a pointer that points to that object would point. Even though the meaning might be inferred from the context. I think the improvement to this definition can be
an object of type T that is not an array element is considered to be the array element 0 of an array with one element of type T.
This can clearly convey that a pointer points to an object of type T that is not an array element can be considered to point to the array element 0 of an array object x with one element of type T for both pointer arithmetic and comparison purpose.
The text was updated successfully, but these errors were encountered:
[expr.add] p4 defines the concept of pointer arithmetic evaluation
Which requires we clearly know which element of the array
P
points to. However, for the pointer arithmetic and comparison purpose, the definition of an object that is not an array element is defined as what [basic.compound] p3 says"belong to" is not clear. It is even vague which element of the array is to which a pointer that points to that object would point. Even though the meaning might be inferred from the context. I think the improvement to this definition can be
This can clearly convey that a pointer points to an object of type
T
that is not an array element can be considered to point to the array element 0 of an array objectx
with one element of typeT
for both pointer arithmetic and comparison purpose.The text was updated successfully, but these errors were encountered: