title: C++ "Cannot declare parameter to be of abstract type
body: <p>I'm trying to implement generic wrapper in C++ that will be able to compare two things. I've done it as follows:</p>
  
  <pre><code>template &lt;class T&gt;
  class GameNode {
      public:
          //constructor
          GameNode( T value )
              : myValue( value )
          { }
  
          //return this node's value
          T getValue() {
              return myValue;
          }
  
          //ABSTRACT
          //overload greater than operator for comparison of GameNodes
          virtual bool operator&gt;( const GameNode&lt;T&gt; other ) = 0;
  
          //ABSTRACT
          //overload less than operator for comparison of GameNodes
          virtual bool operator&lt;( const GameNode&lt;T&gt; other ) = 0;
  
      private:
          //value to hold in this node
          T myValue;
  };
  </code></pre>
  
  <p>It would seem to be I can't overload the '&lt;' and '>' operators in this way, so I'm wondering what I can do to get around this.</p>