title: Allowing template parameter to be only certain types and deciding action based on it
body: <p>Let say i have two classes <code>MyClass_one</code> , <code>MyClass_two</code></p>
  
  <p>And i have function that accept only them as first parameter</p>
  
  <pre><code>template&lt;typename T,typename ...Ts&gt;
  void doSomething(T one, Ts...two){}
  </code></pre>
  
  <p>Now to make it simple, if parameter <code>one</code> is <code>MyClass_one</code> it should print "im one" if its <code>MyClass_two</code> it should print "im two".</p>
  
  <p>How to actually achieve this? The only solution i have came up with is really ugly and does not containt compile error throwing:</p>
  
  <pre><code>template&lt;typename T&gt; isOne{ static const bool value = false}
  template&lt;&gt; isOne&lt;MyClass_one&gt;{ static const bool value = true}
  
  template&lt;typename T&gt; isTwo{ static const bool value = false}
  template&lt;&gt; isTwo&lt;MyClass_two&gt;{ static const bool value = true}
  
  template&lt;typename T, typename ... Ts&gt;
  void doSomething(T one, Ts...two){
    if( isOne&lt;T&gt;::value ) { cout &lt;&lt; "im one" &lt;&lt; endl;}
    else if ( isTwo&lt;T&gt;::value){ cout &lt;&lt;"im two" &lt;&lt; endl;}
  }
  </code></pre>
  
  <p>However how to implement the compiler error check without overloading (multiple definition of <code>doSomething()</code> function) e.g the function will not compile if something else than <code>MyClass_one</code> or <code>MyClass_two</code> is passed.</p>
  
  <p>thanks for help.</p>