O'Reilly logo
  • Roberto Orsini thinks this is interesting:

Functions, including overloaded operators, that take parameters of a class type (or pointer or reference to a class type), and that are defined in the same namespace as the class itself, are visible when an object of (or reference or pointer to) the class type is used as an argument.


Cover of C++ Primer, Fourth Edition


if it weren't so, you could not write "std::cout << "hello"" because you'd have to qualify the operator<< with its namespace.