title: User Defined Class as a Template Parameter
body: <p>I' m re-implementing <code>std::map</code>. I need to make sure that <strong>any data type (basic or user defined) key</strong> will work with it. I declared the Map class as a template which has two parameters for the key and the value. My question is if I need to use a string as the key type, <strong>how can I overload the &lt; and > operators for string type keys only??</strong> In template specialization we have to specialize the whole class with the type we need as I understand it.<br>
  Is there any way I can do this in a better way?? What if I add a separate Key class and use it as the template type for Key?</p>