3 ms·
Yes, except that you're far more often operating at the 0 boundary instead of at the INT_MIN / INT_MAX boundaries. Also note that C only half-heartedly support
by zvrba 11y ago
Yes, except that you're far more often operating at the 0 boundary instead of at the INT_MIN / INT_MAX boundaries.
Also note that C only half-heartedly supports objects larger than SIZE_MAX/2: relevant quote from http://en.cppreference.com/w/cpp/types/ptrdiff_t http://en.cppreference.com/w/cpp/types/ptrdiff_t
"If an array is so large (greater than PTRDIFF_MAX elements, but less than SIZE_MAX bytes), that the difference between two pointers may not be representable as std::ptrdiff_t, the result of subtracting two such pointers is undefined. "