title: Is there a difference between -1 and ~0?
body: <p>When comparing a unsigned value, as in this test:</p>
  
  <pre><code>if (pos == (size_t)-1)
  </code></pre>
  
  <p>Is this comparison <strong>technically</strong> different from something like:</p>
  
  <pre><code>if (pos == (size_t)~0)
  </code></pre>
  
  <p>I am not used to the second variant. That's why I am asking the question. The answer may be rather straighforward if it's yes.</p>