title: C++: Swap two elements of two different vectors
body: <pre><code>std::vector&lt;int&gt; v1 = {1,3,6};
  std::vector&lt;int&gt; v2 = {2,4,7};
  </code></pre>
  
  <p>swap v1[m] with v2[n]</p>
  
  <p>instead of copying and then just overwriting both elements</p>
  
  <p>I tried </p>
  
  <pre><code>std::swap(v1.begin() + m, v2.begin() + n);
  </code></pre>
  
  <p>but that didn't work</p>