21 Sep
2014
21 Sep
'14
10:43 a.m.
On 09/21/2014 07:06 AM, TONGARI J wrote:
2014-09-21 1:48 GMT+08:00 Nat Goodspeed
mailto:nat@lindenlab.com>:
Doesn't the standard say pointer comparisons are only defined between pointers into the same container? Therefore wouldn't the above be UB?
o_O!? That would be scary, do you really mean pointer or iterator? Where's the paragraph?
Paragraph [expr.rel]/3 does not specify this general case. Think of near pointers in the segmented memory model. For an in-depth discussion see commentary 1209 in: http://c0x.coding-guidelines.com/6.5.8.pdf