title: Overloading operator+ in a template class with 2 templates
body: <p>I have the following templatе:</p>
  <pre><code>template &lt;typename T1, typename T2&gt;
  class equationSolution {
  public:
      T1 a, b, c;
      float d;
      
      friend ostream&amp; operator&lt;&lt; &lt;T1, T2&gt;(ostream&amp; str, const equationSolution&lt;T1, T2&gt;&amp; ov);
  
      equationSolution&lt;T1,T2&gt;&amp; operator+=(const equationSolution&lt;T1, T2&gt;&amp; ov, const int&amp; value);
  
      equationSolution() : a(0), b(0), c(0) {}
      equationSolution(T1 a1, T1 b1, T1 c1) : a(a1), b(b1), c(c1) {
          a = a;
          b = b;
          c = c;
          d = pow(b, 2) - 4 * a * c;
      }
  }
  </code></pre>
  <p>I managed to overload the output</p>
  <pre><code>template &lt;typename T1, typename T2&gt;
  ostream&amp; operator&lt;&lt;(ostream&amp; str, const equationSolution&lt;T1, T2&gt;&amp; ov)
  {
      str &lt;&lt; &quot;(&quot; &lt;&lt; ov.a &lt;&lt; &quot;,&quot; &lt;&lt; ov.b &lt;&lt; &quot;,&quot; &lt;&lt; ov.c &lt;&lt; &quot;)&quot;;
      return str;
  }
  </code></pre>
  <p>But with the operator <code>+=</code> I have difficulties.
  That's what I did:</p>
  <pre><code>friend equationSolution&lt;T1, T2&gt;&amp; operator += (const equationSolution&lt;T1, T2&gt;&amp; ov, const int&amp; value) {
      ov.a += value;
      ov.b += value;
      ov.c += value;
  
      return ov;
  }
  </code></pre>
  <p>But I have error:</p>
  <pre><code>binary &quot;operator + =&quot; has too many parameters
  </code></pre>