title: Why int plus uint returns uint?
body: <p>int plus unsigned int returns an unsigned int. Should it be so?</p>
  
  <p>Consider this code:</p>
  
  <pre><code>#include &lt;boost/static_assert.hpp&gt;
  #include &lt;boost/typeof/typeof.hpp&gt;
  #include &lt;boost/type_traits/is_same.hpp&gt;
  
  class test
  {
      static const int          si = 0;
      static const unsigned int ui = 0;
  
      typedef BOOST_TYPEOF(si + ui) type;
      BOOST_STATIC_ASSERT( ( boost::is_same&lt;type, int&gt;::value ) ); // fails
  };
  
  
  int main()
  {
      return 0;
  }
  </code></pre>