ADL with typedefs from another namespace
I have something like this: #include <iostream> namespace N { typedef std::pair<int, double> MyPair; std::ostream& operator << (std::ostream& o, MyPair const & mypair) { /// } } int main() { N::MyPair pr; std::cout << pr; } This naturally doesn't work, because ADL won't find operator<< because namespace N is not associated with MyPair (unfortunately). Afaik one may not add to namespace std, so if I chose to define operator << in std that would be kinda illegal. So... what to do in such situations? I don't want to explicitly qualify operator << , nor do I wish to write using namespace N . So,