title: Checking for Operator precedence?
body: <p>So i'm making a parser for a project, its asking me to make an if statement that checks if my current token is a left associative operator AND if that token has greater precedence than the top of my stack. I have no idea how to check for the precedence.</p>
  
  <p>The project is eventually going to be a calculator that takes in the input and switches it into reverse polish notation. So the code will not know what operators are to be checked until input is received.</p>
  
  <pre><code>while(is&lt;Operator&gt;(infixTokens.at(i)){
    if(is&lt;LAssocOperator&gt;(infixTokens.at(i)) &amp;&amp; infixTokens.at(i) &gt;=tkn.top()){
    //exits while loop
    }
  }
  </code></pre>
  
  <p>tkn is a stack and infixTokens is a vector.
  the >= doesn't seem to be working.
  What would be the best way to check which operator held in each element is greater than the other?</p>