Why are (member) function pointers behaving so weirdly in Visual C++?

后端 未结 3 1990
太阳男子
太阳男子 2020-12-14 06:48

I\'ve had a really bizarre problem that I\'ve reduced to the following test case:

#include 
#include 
#include 

str         


        
3条回答
  •  既然无缘
    2020-12-14 07:26

    It turns out Visual C++'s linker can merge functions with identical definitions into one.
    Whether that's legal or not according to C++, I have no idea; it affects observable behavior, so it looks like a bug to me. Someone else with more information may want to chime in on that though.

提交回复
热议问题