title: Is a negative integer summed with a greater unsigned integer promoted to unsigned int?
body: <p>After getting advised to read "C++ Primer 5 ed by Stanley B. Lipman" I don't understand this:</p>
  
  <p>Page 66. "Expressions Involving Unsigned Types"</p>
  
  <pre><code>unsigned u = 10;
  int i = -42;
  std::cout &lt;&lt; i + i &lt;&lt; std::endl; // prints -84
  std::cout &lt;&lt; u + i &lt;&lt; std::endl; // if 32-bit ints, prints 4294967264
  </code></pre>
  
  <p>He said: </p>
  
  <blockquote>
    <p>In the second expression, the int value -42 is converted to unsigned before the addition is done. Converting a negative number to unsigned behaves exactly as if we had attempted to assign that negative value to an unsigned object. The value “wraps around” as described above.</p>
  </blockquote>
  
  <p>But if I do something like this:</p>
  
  <pre><code>unsigned u = 42;
  int i = -10;
  std::cout &lt;&lt; u + i &lt;&lt; std::endl; // Why the result is 32?
  </code></pre>
  
  <p>As you can see <code>-10</code> is not converted to <code>unsigned int</code>. Does this mean a comparison occurs before promoting a <code>signed integer</code> to an <code>unsigned integer</code>?</p>