D
Dominic Genest
Hi,
If two pointers point to the same memory block, can I be absolutely
sure, according to official standard C++ specifications, that the
expression, at any time in the program, even if the operating system
decided to cache or move memory blocks or anything, "p1==p2" will
evaluate to true ?
Of course, if "p1==p2" is true, I know that I can conclude that p1 and
p2 point to the same object. But what about the inverse ? If p1 and p2
point to the same object, will p1 and p2 be the same for sure ? Even
after casts ?
Could someone point to some official documentation that would tell me
so for C++ standards ?
Thanks a lot !
Dom
If two pointers point to the same memory block, can I be absolutely
sure, according to official standard C++ specifications, that the
expression, at any time in the program, even if the operating system
decided to cache or move memory blocks or anything, "p1==p2" will
evaluate to true ?
Of course, if "p1==p2" is true, I know that I can conclude that p1 and
p2 point to the same object. But what about the inverse ? If p1 and p2
point to the same object, will p1 and p2 be the same for sure ? Even
after casts ?
Could someone point to some official documentation that would tell me
so for C++ standards ?
Thanks a lot !
Dom