title: How to distinguish these two insert functions
body: <p>My own list has two insert functions</p>
  <pre><code>template&lt;typename T, typename Allocator&gt;
  auto list&lt;T, Allocator&gt;::insert(iterator pos, size_t count, const T &amp; value)-&gt;iterator
  {
      for (size_t i = 0; i &lt; count; i++) {
          pos = insert(pos, value);
      }
      return pos;
  }
  
  
  template&lt;typename T, typename Allocator&gt;
  template&lt;typename ...Args&gt;
   auto list&lt;T, Allocator&gt;::insert(iterator pos, Args &amp;&amp; ...args) -&gt; iterator
  {
       auto ret_val = this-&gt;get_allocator().allocate(1);
       this-&gt;get_allocator().construct(ret_val, std::forward&lt;Args&gt;(args)...);
       auto new_node = new node&lt;T&gt;(ret_val);
       auto current_node = pos.l_node;
       new_node-&gt;n_next = current_node;
       new_node-&gt;n_prev = current_node-&gt;n_prev;
       current_node-&gt;n_prev-&gt;n_next = new_node;
       current_node-&gt;n_prev = new_node;
       return iterator(new_node);
  }
  
  </code></pre>
  <p>Sometimes the compiler does not know which function should be called,For example, the following situation</p>
  <pre><code>list&lt;int&gt; l1;
  l1.insert(l1.begin(),10, 2);
  </code></pre>
  <p>I expect the first function to be called, but in fact the second function is called,Then the following error will appear
  <code>The compiler cannot cast from initializer_list to int.</code></p>
  <p>The code is here:<a href="https://paste.ubuntu.com/p/FxHPrdDHsj/" rel="nofollow noreferrer">https://paste.ubuntu.com/p/FxHPrdDHsj/</a></p>