fork(1) download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. void f(std::string) { std::cout << "string\n"; }
  5. struct foo {
  6. friend void f(foo) {std::cout << "foo\n"; }
  7. };
  8.  
  9. int main() {
  10. f(foo{});
  11. }
Success #stdin #stdout 0s 4440KB
stdin
Standard input is empty
stdout
foo