Unless you want to include the very last byte of memory space while keeping the start<=end invariant.
1
1
I'm moderately sure the C/C++ spec language, by requiring that a pointer one past the final element of an array (or a single-object allocation treatable as a single-element array) compare greater than pointers to array elements, forbids this possibility.
1
1
Somehow this discussion reminds me of hg.mozilla.org/mozilla-centr… and the fact that a harmless read past the end of array can crash if the end of the array happens to line up with a page boundary (in this case, all crash addresses ended in 00000).
May 22, 2021 · 4:47 AM UTC
2
2





