Do distinct functions have distinct addresses?
It looks like defect report 1400: Function pointer equality deals with this issue and seems to me to say that it is okay to do this optimization but as comments indicate, there is disagreement. It says (emphasis mine): According to 5.10 [expr.eq] paragraph 2, two function pointers only compare equal if they point to the … Read more