title: Using Templates to set function types in a class gives error
body: <p>So I have this class:</p>
  <pre><code> template &lt;typename callBackOne,
             typename callBackTwo&gt;
  class MyClass {       // The class
    public: 
      callBackOne cbo;
      callBackTwo cbt;           
      MyClass(callBackOne cbop, callBackTwo cbtp){
        cbop();
        cbtp();
      }
  };
  </code></pre>
  <p>All it does is call the functions you give in the parameter for its constructor.
  The callback function types are deduced by a template. I cannot do this any other way.
  Why does it error when I try:</p>
  <pre><code>MyClass&lt;void,void&gt; test(voidFuncOne,voidFuncTwo);
  </code></pre>
  <p>The error:</p>
  <pre><code>error: invalid parameter type ‘void’
  no matching function for call to ‘MyClass&lt;void, void&gt;::MyClass(int (&amp;)(), void (&amp;)())’
  </code></pre>
  <p>24 |   MyClass&lt;void,void&gt; testy(test,testTwo);</p>
  <p>Ive tried lots of different things including:</p>
  <pre><code>MyClass&lt;void(&amp;)(),void(&amp;)()&gt; test(test,testTwo);
  MyClass&lt;void,void&gt; test(&amp;test,&amp;testTwo);
  MyClass&lt;void (*)(void),void (*)(void)&gt; test(test,testTwo);
  </code></pre>
  <p>I know its possible to pass in functions as parameters like this but i just cant figure out how. Its a problem of knowledge of the language.</p>