title: How to assign two dimensional initializer list in c++?
body: <p>I inherited my class from vector and I would like to be able to assign list to my class like to vector.</p>
  <p>My code is as follows:</p>
  <pre><code>#include &lt;vector&gt;
  using namespace std;
  
  template&lt;typename T&gt;
  class Matrix
      : public vector&lt;vector&lt;T&gt;&gt;
  {
  public:
      Matrix( vector&lt;vector&lt;T&gt;&gt; &amp;&amp; m )
          : vector&lt;vector&lt;T&gt;&gt;( m )
      {}
  
      // Tried this approach, but it doesn't work
      // Matrix(std::initializer_list&lt;std::initializer_list&lt;T&gt;&gt; l){
      // }
  }
  
  int main()
  {
    Matrix&lt;int&gt; m({{0, 1}, {2, 3}}); // it works
    // Matrix&lt;int&gt; m = {{0, 1}, {2, 3}}; // error: no instance of constructor &quot;Matrix&lt;T&gt;::Matrix [with T=int]&quot; matches the argument list -- argument types are: ({...}, {...})
  }
  </code></pre>