Imagine reversing a string:<p><pre><code>  while(pStart &lt;= pEnd)
       swap(*pStart++, *pEnd--);
</code></pre>
If swap doesn&#x27;t work for a self swap, this code would break in the case of an odd length string.
It&#x27;s an easy fix in this case, but being able to swap an element with itself is convenient.