language: C++ 4.7.2 (gcc-4.7.2)
date: 407 days 8 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
struct foo {
    int f();
};
 
int main() {
    void* p = static_cast<void*>(&foo::f);
}
 
prog.cpp: In function ‘int main()’:
prog.cpp:6: error: invalid static_cast from type ‘int (foo::*)()’ to type ‘void*’
prog.cpp:6: warning: unused variable ‘p’