title: Template specialization based on inherit class
body: <p>I want to make this specialized w/o changing main. Is it possible to specialize something based on its base class? I hope so.</p>
  
  <p>-edit-</p>
  
  <p>I'll have several classes that inherit from SomeTag. I don't want to write the same specialization for each of them.</p>
  
  <pre><code>class SomeTag {};
  class InheritSomeTag : public SomeTag {};
  
  template &lt;class T, class Tag=T&gt;
  struct MyClass
  {
  };
  
  template &lt;class T&gt;
  struct MyClass&lt;T, SomeTag&gt;
  {
      typedef int isSpecialized;
  };
  
  int main()
  {
      MyClass&lt;SomeTag&gt;::isSpecialized test1; //ok
      MyClass&lt;InheritSomeTag&gt;::isSpecialized test2; //how do i make this specialized w/o changing main()
      return 0;
  }
  </code></pre>