title: No matching function for call
body: <p>I've been getting this error, and I can't figure out how to fix it:</p>
  
  <pre><code>btree.tem:98:   instantiated from 'std::pair&lt;typename btree&lt;T&gt;::iterator, bool&gt; btree&lt;T&gt;::insert(const T&amp;) [with T = char]'
  test.cpp:13:   instantiated from here
  btree.tem:37: error: no matching function for call to 'btree&lt;char&gt;::addElem(std::_List_iterator&lt;node&lt;char&gt;*&gt;&amp;, node&lt;char&gt;*&amp;)'
  btree.h:178: note: candidates are: void btree&lt;T&gt;::addElem(std::_List_iterator&lt;node&lt;T&gt;*&gt;&amp;, node&lt;T&gt;&amp;) [with T = char]
  btree.tem:98:   instantiated from 'std::pair&lt;typename btree&lt;T&gt;::iterator, bool&gt; btree&lt;T&gt;::insert(const T&amp;) [with T = char]'
  test.cpp:13:   instantiated from here
  btree.tem:48: error: no matching function for call to 'btree&lt;char&gt;::addElem(std::_List_iterator&lt;node&lt;char&gt;*&gt;&amp;, node&lt;char&gt;*&amp;)'
  </code></pre>
  
  <p>Inside my header file I have this setter function:</p>
  
  <pre><code>void addElem (std::_List_iterator&lt;node&lt;T&gt;*&gt;&amp; itr, node &lt;T&gt;&amp; n) {
    neighbours.insert(itr, n); 
  }
  </code></pre>
  
  <p>and I don't know what's wrong with it. The error seems to happen whenever I call it like this:</p>
  
  <pre><code>class list &lt; node&lt;T&gt;* &gt;::iterator itr = bt-&gt;level().begin();
  node &lt;T&gt;*n = new node&lt;T&gt;(elem, bt-&gt;max());
  bt-&gt;addElem(itr, n);
  </code></pre>
  
  <p>What is the problem?</p>