title: no match for operator!=
body: <p>I am trying to create linked list class and define the iterators, I have all of them except the last one. I dont get how to fix, i get this error when i compile my code: </p>
  
  <blockquote>
    <p>no match for ‘operator!=’ in ‘recList.SortedList::begin with T = Record != recList.SortedList::end with T = Record’
    a1q1main.cpp:114:37: note: candidates are:
    sortedlist.h:112:11: note: SortedList::iterator SortedList::iterator::operator!=(bool) [with T = Record, SortedList::iterator = SortedList::iterator]
    sortedlist.h:112:11: note:   no known conversion for argument 1 from ‘SortedList::iterator’ to ‘bool’</p>
  </blockquote>
  
  <p>It keeps on displaying this error no matter what i do
  I have declared operator == and everything is fine but the != complains
  Here is the code :</p>
  
  <pre><code> class SortedList {
   struct Node {
      T data_;
      Node* next_;
      Node* prev_;
      Node(const T&amp; data = T{}, Node* next = nullptr, Node* prev = nullptr) {
          data_ = data;
          next_ = next;
          prev_ = prev;
      }
  };
  Node* head_;
  Node* tail_;
      public:
  class const_iterator {
  protected:
      Node* curr_;
  public:
      const_iterator(Node* p) {
          curr_ = p;
      }
   .........
      const_iterator operator--(int) {
          const_iterator tmp = *this;
          curr_ = curr_-&gt;prev_;
          return tmp;
      }
      const T&amp; operator*() const {
          return curr_-&gt;data_;
      }
  
  
       const_iterator operator==(bool){
              return false;
       }
  
      const_iterator operator!=(bool){
              return true;
      }
  
  return;`
  </code></pre>
  
  <p>I need to fulfill the criteria below:
   operator !=
  returns true if two iterators point at different nodes, false otherwise
  O(1)</p>
  
  <p>I did not complete the logic of the operator, i just need to declare it properly so i dont get the error</p>