title: Why didn't the C++17 standard bring partial class template argument deductions?
body: <p>One of the places I hoped I would be able to use the new template argument deduction, was in construction of <code>std::set</code>'s / <code>std::map</code>s / any other containers with custom comparators - my goal is to create a one-line statement, that will create an efficient set with a lambda comparator.
  What I can do since C++11 is:</p>
  
  <pre><code>std::set&lt;int, std::function&lt;bool(int, int)&gt;&gt; s([](int a, int b) {return a &gt; b;});
  </code></pre>
  
  <p>But since it uses <code>std::function</code>, it is noticeably slower.</p>
  
  <p>Another option is:</p>
  
  <pre><code>auto mycomp = [](int a, int b) {return a &gt; b; };
  std::set&lt;int, decltype(mycomp)&gt; s(mycomp);
  </code></pre>
  
  <p>It gets the job done, but 1) It requires 2 lines, and creation of the <code>mycomp</code> variable 2) I need to pass <code>mycomp</code>'s type explicitly.</p>
  
  <p>As I read on reference pages, none of the standard containers has a deduction guide for this kind of situation. Unfortunately, I'm afraid it cannot be even done with the current language standard (C++17), as one can find:</p>
  
  <blockquote>
    <p>Class template argument deduction is only performed if no template argument list is present. If a template argument list is specified, deduction does not take place.</p>
  </blockquote>
  
  <p>What is the reasoning behind this? Why didn't they allow partial argument deduction? I guess there are some problems with it that I overlook, but in my opinion it would be more than helpful.</p>