title: C++ / priority_queue / Expression: invalid comparator
body: <p><strong>EDIT</strong>
  I included a screenshot of the compile error with reworked code. <a href="https://i.stack.imgur.com/72XTT.png" rel="nofollow noreferrer">compile error screenshot</a></p>
  <p><strong>ORIGINAL POST</strong>
  I am writing a little program to practice my knowledge of priority_queue containers. I am trying to create a priority-queue that takes in Person objects that have an age and sex. The queue is supposed to prioritize older ages and then females over males (ie. older females are prioritized over younger females and females are prioritized over males). I've written a predicate that should handle the prioritization but I get a Expression: invalid comparator error when I try to compile the code snippet below. Can anyone explain what the problem is with my predicate?</p>
  <pre><code>#include &lt;stack&gt;
  #include &lt;queue&gt;
  #include &lt;list&gt;
  #include &lt;vector&gt;
  #include &lt;iostream&gt;
  
  class Person
  {
  public: 
      int age;
      bool isFemale; 
  
      Person(int Age, bool Female)
      {
          age = Age;
          isFemale = Female; 
      }
  
      bool operator &lt; (const Person&amp; compareHuman) const
      {
          bool bRet = false;
  
          if (age &lt; compareHuman.age)
              bRet = true;
  
          if (isFemale &amp;&amp; compareHuman.isFemale)
              bRet = true;
  
          return bRet;    
      }
  };
  
  int main()
  {
      std::priority_queue&lt;Person, std::vector&lt;Person&gt;&gt; humanStack;
      humanStack.push(Person(15, true));
      humanStack.push(Person(42, true));
      humanStack.push(Person(76, true));
      humanStack.push(Person(65, false));
      humanStack.push(Person(21, false));
      humanStack.push(Person(35, true));
      humanStack.push(Person(15, false));
  
      while(humanStack.size() != 0)
      {
              std::cout &lt;&lt; &quot;This person is age &quot; &lt;&lt; humanStack.top().age &lt;&lt; std::endl;
              humanStack.pop(); 
      }
  }
  </code></pre>