title: Class with nested brace-enclosed initializers
body: <p>I want to create a recursive, multi-dimensional array class using variadic templates.</p>
  
  <pre><code>#include &lt;array&gt;
  
  template&lt;int...&gt; struct multi;
  
  template&lt;int Body&gt;
  struct multi&lt;Body&gt;: std::array&lt;int, Body&gt; {        
      template&lt;typename... Params&gt;
      multi(int first, const Params&amp;... args)
          : std::array&lt;int, Body&gt; {{ first, args... }} {
      }
  };
  
  template&lt;int Head, int Body, int... Tail&gt;
  struct multi&lt;Head, Body, Tail...&gt;: std::array&lt;multi&lt;Body, Tail...&gt;, Head&gt; {
      template&lt;typename... Params&gt;
      multi(const multi&lt;Body, Tail...&gt;&amp; first, const Params&amp;... args)
          : std::array&lt;multi&lt;Body, Tail...&gt;, Head&gt; {{ first, args... }} {
      }
  };
  </code></pre>
  
  <p>To initialize an instance of this, class, I have to do the following: </p>
  
  <pre><code>multi&lt;2, 2&gt; m { multi&lt;2&gt;{ 1, 2 }, multi&lt;2&gt;{ 3, 4 } };
  </code></pre>
  
  <p>I'd really appreciate if I could just use a C-array-like style for uniform initialization like so:</p>
  
  <pre><code>multi&lt;2, 2&gt; m { { 1, 2 }, { 3, 4 } };
  </code></pre>
  
  <p>Unfortuanely, this doesn't work as it seems to be impossible to handle these nested initialiers:</p>
  
  <pre><code>multi.cc: In function 'int main()':
  multi.cc:25:40: error: no matching function for call to 'multi&lt;2, 2&gt;::multi(&lt;brace-enclosed initializer list&gt;)'
       multi&lt;2, 2&gt; m { { 1, 2 }, { 3, 4 } };
                                          ^
  multi.cc:25:40: note: candidates are:
  multi.cc:19:5: note: multi&lt;Head, Body, Tail ...&gt;::multi(const multi&lt;Body, Tail ...&gt;&amp;, const Params&amp; ...) [with Params = {}; int Head = 2; int Body = 2; int ...Tail = {}]
       multi(const multi&lt;Body, Tail...&gt;&amp; first, const Params&amp;... args)
       ^
  multi.cc:19:5: note:   candidate expects 1 argument, 2 provided
  multi.cc:17:8: note: constexpr multi&lt;2, 2&gt;::multi(const multi&lt;2, 2&gt;&amp;)
   struct multi&lt;Head, Body, Tail...&gt;: std::array&lt;multi&lt;Body, Tail...&gt;, Head&gt; {
          ^
  multi.cc:17:8: note:   candidate expects 1 argument, 2 provided
  multi.cc:17:8: note: constexpr multi&lt;2, 2&gt;::multi(multi&lt;2, 2&gt;&amp;&amp;)
  multi.cc:17:8: note:   candidate expects 1 argument, 2 provided
  </code></pre>
  
  <p>Is there any way to achieve this?</p>