#include <iostream> using namespace std; struct nat {}; int nat::*get_false() { return 0; } int main() { bool b = get_false(); // ok int n = get_false(); // ng cout << b << n << endl; return 0; }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:9:20: error: cannot convert ‘int nat::*’ to ‘int’ in initialization int n = get_false(); // ng ^
Standard output is empty