Suppose I have two pointers for input T:
T
T* first = ...// whatever T* second = ... //whatever else
Can I be sure that the distance between these two pointers can never exceed:
((size_t)(-1))/sizeof(T)?
((size_t)(-1))/sizeof(T)
You can only calculate the distance between two pointers (subtract one pointer from the other) if both pointers point to elements in the same array or to one end of the end of the same array.
, , ((size_t)(-1)) / sizeof(T), size_t , .
((size_t)(-1)) / sizeof(T)
size_t
, .