title: Question on boost::swap
body: <p>Couple of questions on <code>boost::swap</code>. Please refer to the code below which is basically a cut-paste from <code>boost/swap.hpp</code>. I am referring to library version 1.43.0.</p>
  
  <pre><code>namespace boost_swap_impl
      {
        template&lt;class T&gt;
        void swap_impl(T&amp; left, T&amp; right)
        {
          using namespace std;//use std::swap if argument dependent lookup fails
          swap(left,right);
        }
  
    template&lt;class T, std::size_t N&gt;
    void swap_impl(T (&amp; left)[N], T (&amp; right)[N])
    {
      for (std::size_t i = 0; i &lt; N; ++i)
      {
        ::boost_swap_impl::swap_impl(left[i], right[i]);
      }
    }
  }
  
  namespace boost
  {
    template&lt;class T1, class T2&gt;
    void swap(T1&amp; left, T2&amp; right)
    {
      ::boost_swap_impl::swap_impl(left, right);
    }
  }
  </code></pre>
  
  <ol>
  <li>Why is <code>boost::swap</code> declared as <code>template &lt;typename T1, typename T2&gt;</code> when in the rest of the code it is all dealing with the same type? </li>
  <li>If I define my own global function <code>void swap(T&amp;, T&amp;)</code> I see that it is the global function that gets called from <code>swap_impl(T&amp; left, T&amp; right)</code>. Is this not a conflict and hence an error condition since <code>swap_impl</code> also uses <code>namespace std</code> which has swap defined? </li>
  </ol>