fork download
  1. namespace ns {
  2. struct foo {
  3. friend foo make_foo() { return foo(); }
  4. };
  5. }
  6.  
  7. int main() {
  8. ns::foo x = ns::make_foo();
  9. }
  10.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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’
stdout
Standard output is empty