title: 'this' argument to member function 'select' has type 'const SelectParam', but function is not marked const
body: <p>I'm trying to call a function on a polymorphic item. But I get the following error message at compile time:</p>
  <blockquote>
  <p>'<code>this</code>' argument to member function '<code>select</code>' has type '<code>const SelectParam</code>', but function is not marked <code>const</code></p>
  </blockquote>
  <p>the error is shown at the p-&gt;selection(*it)</p>
  <pre><code>std::set&lt;Tuple&gt;::iterator it;
  for (it = tuples.begin(); it != tuples.end();) {
      for (const SelectParam* p: selectionParams) {
          bool successful = p-&gt;select(*it);
          if( !successful ) {
              it = tuples.erase(it);
          } else {
              it++;
          }
      }
  }
  </code></pre>
  <p>and here's how those classes are defined. (I use to not have all the const and &amp; is there but I put them everywhere I could in hopes that I would make whatever it wanted const but clearly I'm not approaching the problem right since it's not changing anything.</p>
  <p>In one of the child classes that is being stored at parent pointer.</p>
  <pre><code>bool const select(Tuple const &amp; tup) {
      bool matched = false;
      if (tup[idx] == val) {
          matched = true;
      }
      return matched;
  }
  </code></pre>
  <p>In the other child class that is being used with polymorphism</p>
  <pre><code>bool const select(Tuple const &amp; tup) {
      bool matched = false;
      if (tup[idx1] == tup[idx2]) {
          matched = true;
      }
      return matched;
  }
  </code></pre>
  <p>And finally here's the parent class that's super simple.</p>
  <pre><code>class SelectParam {
      public:
      virtual const bool select( Tuple const &amp; t) = 0;
  };
  </code></pre>
  <p>Thanks in advance for being willing to help my feeble brain.</p>