title: std::function template with multiple template parameters
body: <p>When looking for documentation on std::function, I found several pages, that list two implementations of std::function for C++11:</p>
  <ul>
  <li><a href="https://en.cppreference.com/w/cpp/utility/functional/function" rel="nofollow noreferrer">https://en.cppreference.com/w/cpp/utility/functional/function</a></li>
  </ul>
  <blockquote>
  <pre><code>template&lt; class &gt;
  class function; /* undefined */
  template&lt; class R, class... Args &gt;
  class function&lt;R(Args...)&gt;;
  </code></pre>
  </blockquote>
  <ul>
  <li><a href="https://www.tutorialspoint.com/cpp_standard_library/functional.htm" rel="nofollow noreferrer">https://www.tutorialspoint.com/cpp_standard_library/functional.htm</a>,</li>
  </ul>
  <blockquote>
  <pre><code>template &lt;class T&gt; function;     // undefined
  template &lt;class Ret, class... Args&gt; class function&lt;Ret(Args...)&gt;;
  </code></pre>
  </blockquote>
  <ul>
  <li><a href="https://cplusplus.com/reference/functional/function/" rel="nofollow noreferrer">https://cplusplus.com/reference/functional/function/</a></li>
  </ul>
  <blockquote>
  <pre><code>template&lt;class &gt;
  class function;
  </code></pre>
  <p>and</p>
  <pre><code>template&lt; class R, class... Args &gt;
  class function&lt;R(Args...)&gt;
  </code></pre>
  </blockquote>
  <p>I tried to use the multi-parameter version of the function&lt;&gt;-template, but my code does not compile, neither with visual c++ 2017, nor with XCode or g++. Here is my sample code:</p>
  <pre><code>#include &lt;functional&gt;
  
  int main(int argc, char*argv[])
  {
          std::function&lt;void, int&gt; cb;
  }
  </code></pre>
  <p>All compilers complain on std::function taking only a single template parameter.</p>
  <p>Can anybody explain this?</p>