title: Standard behavior for direct initialization of unsigned short
body: <p>I noticed today that in the example code:</p>
  
  <pre><code>void print(unsigned short a) {
     std::cout &lt;&lt; a &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>Initialization and use works like this:</p>
  
  <pre><code>print(short (5));
  </code></pre>
  
  <p>But not like this:</p>
  
  <pre><code>print(unsigned short(6));
  </code></pre>
  
  <blockquote>
    <p>main.cpp:16:8: error: expected primary-expression before 'unsigned'
      print(unsigned short(6));</p>
  </blockquote>
  
  <p>And it's not to do with the type since this also works:</p>
  
  <pre><code>typedef unsigned short ushort;
  print(ushort (6));
  </code></pre>
  
  <p><a href="http://coliru.stacked-crooked.com/a/3af208b545af3a9a" rel="nofollow noreferrer">Live example.</a></p>
  
  <p>So I went searching for what the standard says about value initialization. It turns out nothing:</p>
  
  <blockquote>
    <p>The effects of value initialization are:</p>
    
    <p>1) if T is a class type ...</p>
    
    <p>2) if T is a non-union class type ...</p>
    
    <p>2) if T is a class type ...</p>
    
    <p>3) if T is an array type, ..</p>
    
    <p>4) <strong>otherwise</strong>, the object is zero-initialized.</p>
  </blockquote>
  
  <p><em>Modifications made for readability.</em> <a href="https://en.cppreference.com/w/cpp/language/value_initialization" rel="nofollow noreferrer">Original source</a>.</p>
  
  <p>What are the rules about value initialization of <a href="http://en.wikipedia.org/wiki/Plain_old_data_structure" rel="nofollow noreferrer">POD</a> types? What is the reason that <code>unsigned</code> qualified types can't be value initialized? Is this more to do with the fact they are <code>rvalues</code>?</p>