Ok, look at the expression logically. You have three conditions:
A logical "or" is attached to these sentences. Therefore, if any of them is true, then two pointers are allowed to compare the same. If the compiler so decides, you can skip # 3, but still go through # 2. The logical “or” means that such pointers will compare equal.
In addition, it should be noted that element pointers do not have an “address” in the traditional sense. They matter, but it is not a memory address. This is why you are not allowed to send them to void* , etc.
Passing guarantees if pointers to the functions t and u , if t == u , then t(...); will lead to the same behavior as u(...); . This behavior will either refer to NULL, call the same function, or execute code at the same address. So the same behavior was.
Technically, Mehrdad 's problem is that it gets the same value from two different member function names. So # 3 applies. I don't see anything in the standard that requires that different member function names return different values when getting functions for them.
Nicol Bolas Jan 07 '13 at 2:29
source share