title: std::make_shared with std::initializer_list
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;memory&gt;
  
  class Base
  {
  public:
      Base() {}
  };
  
  class Derived : public Base
  {
  public:
      Derived() {}
      Derived(std::initializer_list&lt;std::pair&lt;int, std::shared_ptr&lt;Base&gt;&gt;&gt;) {}
  };
  
  int main(int argc, char ** argv)
  {
      auto example = new Derived({
          { 0, std::make_shared&lt;Derived&gt;() }
      });
  
      return 0;
  }
  </code></pre>
  
  <p>It works (<a href="https://ideone.com/vJxzIW">live preview</a>) normally, but when I try to use <code>std::make_shared</code> with the <code>std::initializer_list</code> as argument I got errors:</p>
  
  <pre><code>auto example = new Derived({
      { 0, std::make_shared&lt;Derived&gt;({
          { 0, std::make_shared&lt;Derived&gt;() }
      }) }
  });
  </code></pre>
  
  <p>As you can see here on the <a href="https://ideone.com/oiz2Ex">live preview</a>.</p>
  
  <blockquote>
    <p>error: too many arguments to function...</p>
  </blockquote>
  
  <p>It works only when I do this (<a href="https://ideone.com/iZPu2g">live preview</a>):</p>
  
  <pre><code>auto example = new Derived({
      { 0, std::make_shared&lt;Derived&gt;(std::initializer_list&lt;std::pair&lt;int, std::shared_ptr&lt;Base&gt;&gt;&gt; {
          { 0, std::make_shared&lt;Derived&gt;() }
      }) }
  });
  </code></pre>
  
  <p>What I want to know is: Why it works only when I pass the <code>std::initializer_list</code> as argument on <code>std::make_shared</code> instead of using <code>{{}}</code> just like this:</p>
  
  <pre><code>auto example = new Derived({ { 0, std::make_shared&lt;Base&gt;() } });
  </code></pre>
  
  <p>Is that possible to make <code>std::make_shared</code> accept it?</p>
  
  <p>Thanks in advance.</p>