Why does C++11 not support declaring extern “C” on a static member function?
问题 Provided that I have a C library containing a function declared as void g(void (*callback)()); The following code is elegant yet illegal: struct A { // error C2159: more than one storage class specified (VC++ Nov 2012 CTP) static extern "C" void callback() {} }; g(A::callback); Why does C++11 not support this? 回答1: This is a particularly confusing topic to wade into. Let's attack §7.5 "Linkage specifications" [dcl.link]. 1) All function types, function names with external linkage, and