title: C++ wrong number of template arguments (2, should be 1)
body: <p>I did a test with c++ parallel quicksort program as below first with list as container then I moved to a generic container type, but it reported the captioned error. </p>
  
  <p>Can help with this?</p>
  
  <pre><code>#include &lt;iostream&gt;     // std::cout
  #include &lt;future&gt;       // std::packaged_task, std::future
  #include &lt;chrono&gt;       // std::chrono::seconds
  #include &lt;thread&gt;       // std::thread, std::this_thread::sleep_for
  #include &lt;list&gt;
  #include &lt;algorithm&gt;
  #include &lt;type_traits&gt;
  #include &lt;iterator&gt;
  
  template&lt;typename F, typename A&gt;
  static std::future&lt;typename std::result_of&lt;F(A&amp;&amp;)&gt;::type&gt; spawn_task(F&amp;&amp; f, A&amp;&amp; a)
  {
      typedef typename std::result_of&lt;F(A&amp;&amp;)&gt;::type result_type;
  
      std::packaged_task&lt;result_type(A&amp;&amp;)&gt; task(std::move(f));
      std::future&lt;result_type&gt; res(task.get_future());
      std::thread myThread(std::move(task), std::move(a));
      myThread.detach();
      return res;
  }
  
  template&lt;class T, template&lt;class T&gt; class Container&gt;
  
  static Container&lt;T&gt; parallel_quick_sort(Container&lt;T&gt; input)
  {
      if (input.empty())
      {
          return input;
      }
  
      Container&lt;T&gt; result;
      result.splice(result.begin(), input, input.begin());
      T const&amp; partition_val = *result.begin();
  
      typename Container&lt;T&gt;::iterator divide_point = std::partition
      (input.begin(), input.end(), [&amp;](T const&amp; t)
          {
           return t&lt;partition_val;
          }
      );
  
      Container&lt;T&gt; lower_part;
      lower_part.splice(lower_part.end(), input, input.begin(), divide_point);
  
      std::future&lt;Container&lt;T&gt; &gt; new_lower
      (
          spawn_task(&amp;parallel_quick_sort&lt;T&gt;, std::move(lower_part))
      );
      Container&lt;T&gt; new_higher(parallel_quick_sort(std::move(input)));
      result.splice(result.end(), new_higher);
      result.splice(result.begin(), new_lower.get());
  
      return result;
  }
  
  
  static void testQuickSort()
  {
      std::list&lt;int&gt; toSort={1, 4, 3, 6, 4, 89, 3};
      std::for_each
      (    
          std::begin(toSort), std::end(toSort), [](int n)
          {
              std::cout &lt;&lt; n &lt;&lt; std::endl;
          }
      );
  
      std::list&lt;int&gt; sorted;
      sorted = parallel_quick_sort(toSort);
      std::for_each
      (
          std::begin(sorted), std::end(sorted), [](int n)
          {
              std::cout &lt;&lt; n &lt;&lt; std::endl;
          }
      );
  }
  </code></pre>
  
  <p>The error message is:</p>
  
  <blockquote>
    <p>../src/TestGenericQuickSort.h: In static member function ‘static void TestGenericQuickSort::testQuickSort()’:</p>
    
    <p>../src/TestGenericQuickSort.h:67:41: error: no matching function for call to ‘TestGenericQuickSort::parallel_quick_sort(std::list&amp;)’ sorted=parallel_quick_sort(toSort);</p>
    
    <p>../src/TestGenericQuickSort.h:67:41: note: candidate is:</p>
    
    <p>../src/TestGenericQuickSort.h:33:22: note: template class Container> static Container TestGenericQuickSort::parallel_quick_sort(Container) static Container parallel_quick_sort(Container input)</p>
    
    <p>../src/TestGenericQuickSort.h:33:22: note:   template argument deduction/substitution failed:</p>
    
    <p>../src/TestGenericQuickSort.h:67:41: error: wrong number of template arguments (2, should be 1) sorted=parallel_quick_sort(toSort);</p>
    
    <p>../src/TestGenericQuickSort.h:32:44: error: provided for ‘template class Container’ template class Container></p>
  </blockquote>