title: Overloading template class comparison operators
body: <p>I am having a ton of trouble with overloading comparison operators in C++. I don't think I am doing it correctly, any help is appreciated. I have provided a snippet of my class below.</p>
  
  <pre><code>template &lt;typename T&gt;
  class A
  {
  public:
      template &lt;typename T&gt;
      bool operator&lt;  (const A&lt;T&gt;&amp; rhs) const {
          return (value &lt; rhs);
      }
  private:
      T value;
  };
  </code></pre>