title: Brace-enclosed initializer list of templated struct
body: <pre><code>#include &lt;array&gt;                                                                
  #include &lt;vector&gt;                                                               
  #include &lt;cinttypes&gt;                                                            
  #include &lt;iostream&gt;                                                             
  
  using namespace std;                                                            
  
  template&lt;size_t N&gt;                                                              
  struct item_t {                                                                 
    array&lt;uint32_t, N&gt; weight = {0};                                              
  };                                                                              
  
  int main(void) {                                                                
  
    vector&lt;item_t&lt;3&gt;&gt; items;                                                      
    items.emplace_back({{9,2,3}});                                                
    cout &lt;&lt; items[0].weight[0] &lt;&lt; endl;                                           
    return 0;                                                                     
  };  
  </code></pre>
  
  <p>I'm at a bit of a loss here. Error is on the emplace_back line and no idea how to resolve it. Any help or hints would be appreciated, thanks.</p>
  
  <p>EDIT</p>
  
  <p>gcc version 4.8.2</p>
  
  <pre><code>$ g++ -std=c++11 test.cpp 
  test.cpp: In function ‘int main()’:
  test.cpp:16:30: error: no matching function for call to ‘std::vector&lt;item_t&lt;3ul&gt; &gt;::emplace_back(&lt;brace-enclosed initializer list&gt;)’
    items.emplace_back({{9,2,3}});
                                ^
  test.cpp:16:30: note: candidate is:
  In file included from /usr/include/c++/4.8/vector:69:0,
                   from test.cpp:2:
  /usr/include/c++/4.8/bits/vector.tcc:91:7: note: void std::vector&lt;_Tp, _Alloc&gt;::emplace_back(_Args&amp;&amp; ...) [with _Args = {}; _Tp = item_t&lt;3ul&gt;; _Alloc = std::allocator&lt;item_t&lt;3ul&gt; &gt;]
         vector&lt;_Tp, _Alloc&gt;::
         ^
  /usr/include/c++/4.8/bits/vector.tcc:91:7: note:   candidate expects 0 arguments, 1 provided
  </code></pre>
  
  <p>The problem is with the struct initialization <code>= {0}</code> and with <code>emplace_back</code>.</p>