title: C++ class template of specific baseclass
body: <p>Let's say I have the classes:</p>
  
  <pre><code>class Base{};
  
  class A: public Base{
      int i;
  };
  
  class B:public Base{
      bool b;
  };
  </code></pre>
  
  <p>And now I want to define a templated class:</p>
  
  <pre><code>template &lt; typename T1, typename T2 &gt;
  class BasePair{
      T1 first;
      T2 second;
  };
  </code></pre>
  
  <p>But I want to define it such that only decendants of class Base can be used as templateparameters.</p>
  
  <p>How can I do that?</p>