title: Why auto is deduced to int instead of uint16_t
body: <p>I have the following code:</p>
  
  <pre><code>uint16_t getLastMarker(const std::string &amp;number);
  ...
  const auto msgMarker = getLastMarker(msg.number) + static_cast&lt;uint16_t&gt;(1);
  static_assert(std::is_same&lt;decltype(msgMarker), const int&gt;::value, "Should fail");
  static_assert(std::is_same&lt;decltype(msgMarker), const uint16_t&gt;::value, "Should not fail");
  </code></pre>
  
  <p>and I expect that the first assertion will fail and second one will not. However <code>gcc 4.9.2</code> and <code>clang 3.6</code> do the opposite. If I use uint16_t instead of auto in my code proper assertion fails and another one succeeds.</p>
  
  <p>P.S. Initially I had just <code>1</code> instead of <code>static_cast&lt;uint16_t&gt;(1)</code> and thought that the issue is caused by the fact that numeric literal <code>1</code> has type int but wrong assertion fails even after explicit cast here.</p>