Brace-or-equal-initializers default value in child doesn't seem work : <p>I try understand what's going on here, why <code>bar</code> doesn't have default value for <code>name</code> property</p>

<pre><code>#include &lt;string&gt;

struct Foo
{
    std::string name = "foo default value";
    std::size_t number = 23;
};

struct Bar : public Foo
{  
    std::string name = "here i want other value";
};

int main(int argc, char * argv[])
{
    Foo foo;
    std::cout&lt;&lt;"name="&lt;&lt; foo.name &lt;&lt; " number=" &lt;&lt; foo.number &lt;&lt; std::endl;
    Foo * bar = &amp;Bar();
    std::cout&lt;&lt;"name="&lt;&lt; bar-&gt;name &lt;&lt; " number=" &lt;&lt; bar-&gt;number &lt;&lt; std::endl;
    return 0;
}
</code></pre>

<p>output:</p>

<pre><code>name=foo default value number=23
name= number=23 // why name is empty string?
</code></pre>

<p>I assume that's default generated constructos are involed in final result. But can't get it right in my mind. Can someone explain what sorcery compiler does here?</p>
