title: ADL with typedefs from another namespace
body: <p>I have something like this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  namespace N
  {
     typedef std::pair&lt;int, double&gt; MyPair;
     std::ostream&amp; operator &lt;&lt; (std::ostream&amp; o, MyPair const &amp; mypair)
     {
        ///
     }
  }
  
  int main()
  {
      N::MyPair pr;
      std::cout &lt;&lt; pr;
  }
  </code></pre>
  
  <p>This naturally doesn't work, because ADL won't find <code>operator&lt;&lt;</code> because <code>namespace N</code> is not associated with <code>MyPair</code> (unfortunately). Afaik one may not add to namespace std, so if I chose to define <code>operator &lt;&lt;</code> in std that would be kinda illegal. So... what to do in such situations? I don't want to explicitly qualify <code>operator &lt;&lt;</code>, nor do I wish to write <code>using namespace N</code>. So, questions are:</p>
  
  <ol>
  <li>How to refactor the code?</li>
  <li>Why wouldn't ADL associate namespaces of typedefs? Serious reasons? It would be nice, e.g. in this case. Thanks</li>
  </ol>