fork(1) download
  1. #include <iostream>
  2.  
  3. struct B{};
  4. B*foo(B*ptr);
  5. struct A{friend B*foo(B*ptr){std::cout<<"impossible";return ptr;}};
  6.  
  7. int main(){
  8. B*ptr;
  9. foo(ptr);
  10. //A::foo(ptr);
  11. return 0;
  12. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
impossible