title: Overloading a function using templates
body: <p>I am trying to define a function using templates and I want the typename to be either int or anEnum (a specific enum I had defined). I have tried the following but I have failed:</p>
  
  <pre><code>template &lt;int | anEnum T&gt; // or &lt;int T, anEnum T&gt; or &lt;int, anEnum T&gt;
  bool isFunction(const T &amp;aVariable){}
  </code></pre>
  
  <p>What I am trying to do is to use templates, instead of defining two overloaded functions.
  I'd prefer the function to be called as the following, without the programmer having to consider the type</p>
  
  <pre><code>isFunction(aVariable) // and not isFunction&lt;int&gt; (aVariable) nor isFunction&lt;anEnum&gt; (aVariable)
  </code></pre>
  
  <p>Basically, I want this function to be templated for int and aNum types. I have searched for this, but could not find the answer. What may I be missing? Thank you,</p>