fork download
  1. #include <iostream>
  2.  
  3. namespace so
  4. {
  5. struct foo { int x; };
  6.  
  7. inline bool do_it(foo const &, foo const &)
  8. {
  9. std::cout << "so" << std::endl;
  10. return (true);
  11. }
  12.  
  13. struct other
  14. {
  15. inline static bool do_it(so::foo const &, so::foo const &)
  16. {
  17. std::cout << "so::other" << std::endl;
  18. return (true);
  19. }
  20.  
  21. static void somefunc(so::foo const & a, so::foo const & b)
  22. {
  23. do_it(a, b);
  24. }
  25. };
  26.  
  27. }
  28.  
  29. int main()
  30. {
  31. so::foo a_, b_;
  32.  
  33. so::other::somefunc(a_, b_);
  34.  
  35. return (0);
  36. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
so::other