title: How to ensure that the template parameter is a subtype of a desired type?
body: <p>I have a template class, what I want to do are the following</p>
  
  <ol>
  <li>Make sure that an object is instantiated only if the template parameter passed is a subtype of a desired type</li>
  <li>Communicate to the user of the code upfront what is it that the template parameter must satisfy</li>
  </ol>
  
  <p>(1) is sort of taken care automatically in the sense if the template parameter passed does not support some feature that the class uses the code will not compile. But this error may be detected fairly late. I want the checks to be as early as possible. What I also want to accomplish is that it should be obvious rightaway that template parameter that is passed has to be derived from a base type that I provide.</p>
  
  <p>First, is this misguided ? and if not how shall I do this ? (the simplest way please, C++ is still new to me)</p>
  
  <p>Thanks stackoverflow, you have really speeded up my C++ learning rate.</p>