title: in c++11, can you always (safely) replace a memset() initialization with an empty initializer?
body: <p>I frequently come across POD structs in code that are manually zero-initialized with <code>memset</code> like so:</p>
  
  <pre><code>struct foo;
  memset(&amp;foo, 0, sizeof(foo));
  </code></pre>
  
  <p>I checked the C++11 standard and it says: <em>"An object whose initializer is an empty set of parentheses, i.e., (), shall be value-initialized."</em> <strong>Followed by:</strong> <em>"To value-initialize a [pod struct] of type T means ... the object is zero-initialized."</em></p>
  
  <p>So... does this mean you can <strong>always safely</strong> condense the above code to just the following:</p>
  
  <pre><code>struct foo{};
  </code></pre>
  
  <p>And have a guaranteed initialized struct as if you had called <code>memset(&amp;foo, 0, ...)</code>?</p>
  
  <hr />
  
  <p><strong>If so</strong>, then generally speaking, can you <strong>safely initialize anything</strong> with empty initializers like so:</p>
  
  <pre><code>SomeUnknownType foo{};  // will 'foo' be completely "set" to known values?
  </code></pre>
  
  <p>I know this wasn't always possible in C++03 (before <a href="http://en.wikipedia.org/wiki/C++11#Uniform_initialization">uniform initialization syntax</a>) but is it possible now in C++11 for any type?</p>