Why am I getting the error operator() cannot be overloaded?
<p>I have two overloads of <code>operator()</code>, one that takes a function reference that takes any type as its parameters and returns any type. And another one which takes a function reference that takes any type as its parameter but returns <code>void</code>. Upon instantiation of my class I get the following errors:</p>

<blockquote>
  <p><code>In instantiation of 'A&lt;void, int&gt;':</code><br>
  <code>error: 'void A&lt;T, F&gt;::operator()(void (&amp;)(F)) [with T = void, F = int]' cannot be overloaded</code><br>
  <code>error: with 'void A&lt;T, F&gt;::operator()(T (&amp;)(F)) [with T = void, F = int]'</code></p>
</blockquote>

<pre><code>template &lt;typename T, typename F&gt; struct A {
    void operator()(T (&amp;)(F)) {}
    void operator()(void (&amp;)(F)) {}
};

void f(int) {}

int main() {

    A&lt;void, int&gt; a;
    a(f);
}
</code></pre>

<p>These errors only occur when the first template argument <code>T</code> is <code>void</code>. I would like to know what I'm doing wrong and why I can't overload <code>operator()</code> this way?</p>
