title: Can't resolve Error: non-const lvalue reference to type 'bool' cannot bind to a temporary of type 'bool'
body: <p>I am trying to overload the less than operator, but I keep getting 
   Error: non-const lvalue reference to type 'bool' cannot bind to a temporary of type 'bool'.
   If it helps, the dv variable that I am trying to compare is an integer. Any help that y'all
   can give would be awesome! Thanks!!!</p>
  
  <pre><code> //function declaration
   friend bool &amp; operator &lt; (const Vertex &amp; v1, const Vertex &amp; v2);
  
   ///function definition 
   bool &amp; operator &lt; (Vertex &amp; v1, Vertex &amp; v2)
   {
     return v1.getDV() &gt; v2.getDV();
   }
  </code></pre>