The C ++ 11 standard says:
5.10 Equality Operators
Pointers of the same type (after conversion of pointers) can be compared for equality. Two pointers of the same type compare the same if and only if both are equal to zero, both indicate the same function or both represent the same address (3.9.2).
If you do not have function pointers, they may have the same address, but we would not know. If you are comparing pointers to two different functions, they should not compare the same.
One of the reasons for the confusion may be that MSVC compilers, as you know, combine code for template functions that produce identical machine code for different types (for example, int and long ). It does not meet the requirements.
However, this applies to functions with different signatures, and not to which particular issue.
Bo persson
source share