title: c++ template expected primary expression before
body: <p>I'm new to templates and couldn't find the answer to my problem on the forums here, maybe I just don't know what to search for exactly.</p>
  
  <p>My code:</p>
  
  <pre><code>template&lt;class T&gt;
  vector&lt;T&gt; properDivisors(T input) {
      vector&lt;T&gt;retVal;
      for(T d = T()+1;d&lt;input;d++) {
          if((double)input/(double)d == input/d)
              retVal.push_back(d);
      }
      return retVal;
  }
  
  template&lt;class T&gt;
  T sumTypeOf(T input) {
      vector&lt;T&gt;divisors = properDivisors(T);
      return someEnum;
  }
  </code></pre>
  
  <p>When compiling I get an error on the line:</p>
  
  <pre><code>    vector&lt;T&gt;divisors = properDivisors(T);
  </code></pre>
  
  <p>The error is:
  error: expected primary-expression before ')' token</p>