title: Uniform Initialization Syntax in complex hierarchy construction?
body: <p>I'm using GCC 4.4.5.</p>
  
  <p>Here is the reproduction of my problem :</p>
  
  <pre><code>#include &lt;vector&gt;
  
  class Test
  {
  public:
  
      Test( int a, int b = 42 ) : m_a( a ), m_b( b ) {}
  
  private:
  
      int m_a;
      int m_b;    
  };
  
  typedef std::vector&lt;Test&gt; TestList;
  
  
  class TestMaster
  {
  public:
  
      TestMaster( TestList tests = TestList() ) : m_tests( tests ) {}
  
  
  private:
  
      TestList m_tests;
  
  };
  </code></pre>
  
  <p>Now, this works :</p>
  
  <pre><code>int main()
  {
  
      TestList test_list = { 15, 22, 38 };
  
  
      return 0;
  }
  </code></pre>
  
  <p>But this doesn't compile :</p>
  
  <pre><code>class TestManager : public TestMaster
  {
  public:
  
      TestManager()
          : TestMaster( { { 42, 54, 94 } } ) //?
      {}
  
  
  };
  
  
  
  int main()
  {
  
      TestManager test_manager;
  
  
      return 0;
  }
  </code></pre>
  
  <p>Or maybe I just don't use the correct syntax? Or is GCC wrong?</p>
  
  <p>The error :</p>
  
  <pre><code>g++ -std=c++0x hello_world.cpp
  hello_world.cpp: In constructor \u2018TestManager::TestManager()\u2019:
  hello_world.cpp:38: erreur: no matching function for call to \u2018TestMaster::TestMaster(&lt;brace-enclosed initializer list&gt;)\u2019
  hello_world.cpp:24: note: candidats sont: TestMaster::TestMaster(TestList)
  hello_world.cpp:21: note:                 TestMaster::TestMaster(const TestMaster&amp;)
  </code></pre>
  
  <p>I also tried a simpler way of doing the same (without inheritance) :</p>
  
  <pre><code>TestMaster test_master = { { 42, 54, 94 } };
  </code></pre>
  
  <p>With the same errror.</p>
  
  <p>Any idea? I can't see why the semantic wouldn't work here...</p>