title: empty brace-init-lists emit warnings about missing field initializers
body: <p>Goal: to be able list-initialize objects and to have the default
  initialization init all PODs to 0/<code>false</code> with as little boilerplate
  as possible (C++11).</p>
  
  <p>Assume I have several classes with several PODs (think of file format
  parsing). In order not to deal with undefined values I would like the
  default constructed objects to be value-initialized to 0. For example,
  providing my own default c'tor that <code>memset()</code>s <code>this</code> works fine for
  such cases, as does naming all members explicitely.</p>
  
  <p>However, this is boilerplate. Even more importantly providing my own
  argument-less default constructor prevents me from using the list
  initializer syntax for member initialization:</p>
  
  <pre><code>class Fails1 {
  public:
    int a, b;
    Fails1() { memset(this, 0, sizeof(*this)); }
  };
  
  Fails1 this_works;
  Fails1 this_fails{ 42, 54 }; // compiler error
  </code></pre>
  
  <p>I could add the constructor for the <code>initializer_list</code> as well, but
  that's even more boilerplate. I want to avoid all that boilerplate.</p>
  
  <p>So I looked at the default constructors provided by the compiler when
  there's no user-provided default constructor in combination with the
  various methods how one can initialize them. Here's where I got
  totally confused:</p>
  
  <pre><code>class A {
  public:
    int a, b;
  };
  </code></pre>
  
  <p>With this class I can use both empty initialization lists and those
  with values without having to provide both constructors myself; that
  is part of what I want.</p>
  
  <pre><code>// Example 1: default initialization
  A a1;
  </code></pre>
  
  <p>The first example uses initialization; members <code>a</code> and <code>b</code> are
  undefined afterwards (not what I want, I want them to be
  value-initialized).</p>
  
  <pre><code>// Example 2: Value-initialization, so this works, I guess:
  A a2 = A();
  </code></pre>
  
  <p>Example 2 uses value initialization and does not copy afterwards. So that is what I want, however, I also thought that empty brace-init-lists would do the same; see the following example:</p>
  
  <pre><code>// Example 3: list-initialization with empty brace-init-list
  A a3{};
  </code></pre>
  
  <p>Example 3 is what I thought would do the trick. List initialization
  with an empty brace-init-list is described in 8.5.4
  "List-initialisation":; especially 8.5.4.3 says: "If the initializer
  list has no elements and T is a class type with a default constructor,
  the objectvalue-initialized". However, this issues warnings with g++ 4.7.2
  with <code>-Wextra</code>:</p>
  
  <pre><code>missing initializer for member ‘A::a’ [-Wmissing-field-initializers]
  missing initializer for member ‘A::b’ [-Wmissing-field-initializers]
  </code></pre>
  
  <p>No warnings by clang++ 3.1, though, so it may also be a bug in g++.</p>
  
  <p>So back to my original question. How do I value-initialize an object
  without having to provide my own boilerplatish default constructor --
  while retaining the ability to use list-initialization for its members
  without having to provide my own <code>initializer_list</code> constructor?</p>