title: cannot convert argument 1 from 'int' to 'int &'
body: <p>I'm getting the next error and I cannot find the reason for it:</p>
  
  <blockquote>
    <p>Error C2664   'void SumID&lt;long>::operator ()&lt;int>(G &amp;)': cannot convert argument 1 from 'int' to 'int &amp;'</p>
  </blockquote>
  
  <p>Why is passing an int by reference problematic?</p>
  
  <p>I have the next class:</p>
  
  <pre><code>template &lt;class T&gt;
  class SumID {
  private:
      T sumid;
  
  public:
      SumID():sumid()
      {
      }
  
      SumID(T s)
      {
          sumid = s;
      }
  
      T getSumID()
      {
          cout &lt;&lt; "inside getSum";
          return sumid;
      }
  
      template &lt;class G&gt;
      void operator() (G&amp; a)
      {
          sumid = sumid+ a;
      }
  };
  </code></pre>
  
  <p>my main : </p>
  
  <pre><code>SumID&lt;long&gt; s;
  for (int i = 0; i &lt; 5; i++)
      s(5); // &lt;-- error here
  </code></pre>