title: how to add template parameter to global function?
body: <p>I'm working with some legacy code, and trying to get it to compile in Linux. It was originally built in visual studio, whose compiler didn't keep with standards. Anyways, now I'm going through the code fixing it and I came across a templated function that is declared globally. I get the error:</p>
  
  <blockquote>
    <p>/home/blah/blah;/blah.h:78:
    error: there are no arguments to
    ‘Clip’ that depend on a template
    parameter, so a declaration of ‘Clip’
    must be available</p>
  </blockquote>
  
  <p>I have been able to fix this same error before when they were in a specific scope by doing myClass::Clip. However, since it has no scope, how do I resolve this?</p>
  
  <p>Updated: here's the declaration of the Clip function:</p>
  
  <pre><code>template&lt;class T&gt; inline T Clip( T x, T bot, T top )
  { return(( x&gt;=bot &amp;&amp; x&lt;=top ) ? x : (( x&lt;bot ) ? bot : top )); }
  </code></pre>
  
  <p>The call to Clip:</p>
  
  <pre><code>src_row = Clip( dst_row + h, 0, SR ); 
  //dst_row + h, 0, SR are all int's... does that help?
  //btw, love the quick responses, thanks.
  </code></pre>
  
  <p>The call and the declaration are in different '.h' files</p>