namespace ns { struct foo { friend foo make_foo() { return foo(); } }; } int main() { ns::foo x = ns::make_foo(); }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:8: error: ‘make_foo’ is not a member of ‘ns’ prog.cpp:8: warning: unused variable ‘x’
Standard output is empty