title: how to provide a swap function for my class?
body: <p>What is the proper way to enable my <code>swap</code> in STL algorithms?</p>
  
  <p>1) Member <code>swap</code>. Does <code>std::swap</code> use SFINAE trick to use the member <code>swap</code>.</p>
  
  <p>2) Free standing <code>swap</code> in the same namespace.</p>
  
  <p>3) Partial specialization of <code>std::swap</code>.</p>
  
  <p>4) All of the above.</p>
  
  <p>Thank you.</p>
  
  <p>EDIT: Looks like I didn't word my question clearly. Basically, I have a template class and I need STL algos to use the (efficient) swap method I wrote for that class.</p>