title: Is using an unsigned rather than signed int more likely to cause bugs? Why?
body: <p>In the <a href="https://google.github.io/styleguide/cppguide.html#Integer_Types" rel="noreferrer">Google C++ Style Guide</a>, on the topic of "Unsigned Integers", it is suggested that</p>
  
  <blockquote>
    <p>Because of historical accident, the C++ standard also uses unsigned integers to represent the size of containers - many members of the standards body believe this to be a mistake, but it is effectively impossible to fix at this point. The fact that unsigned arithmetic doesn't model the behavior of a simple integer, but is instead defined by the standard to model modular arithmetic (wrapping around on overflow/underflow), means that a significant class of bugs cannot be diagnosed by the compiler. </p>
  </blockquote>
  
  <p>What is wrong with modular arithmetic? Isn't that the expected behaviour of an unsigned int?</p>
  
  <p>What kind of bugs (a significant class) does the guide refer to? Overflowing bugs?</p>
  
  <blockquote>
    <p>Do not use an unsigned type merely to assert that a variable is non-negative.</p>
  </blockquote>
  
  <p>One reason that I can think of using signed int over unsigned int, is that if it does overflow (to negative), it is easier to detect.</p>