title: non-member function cannot have cv-qualifier
body: <p>While writing the following function <code>abs</code>, I get the error:</p>
  
  <p>non-member function <code>unsigned int abs(const T&amp;)</code> cannot have cv-qualifier.</p>
  
  <pre><code>template&lt;typename T&gt;
  inline unsigned int abs(const T&amp; t) const
  {
      return t&gt;0?t:-t;
  }
  </code></pre>
  
  <p>After removing the <code>const</code> qualifier for the function there is no error. Since I am not modifying <code>t</code> inside the function the above code should have compiled. I am wondering why I got the error?</p>