title: How to explicitly call const version of the member function?
body: <p>I have an overloaded member function in single class. The differences between two return type and const modifier:</p>
  
  <pre><code>class A
  {
  public:
      int mass() const {return m_mass;}
  protected:
      int&amp; mass() {return m_mass;}
  private:
      int m_mass;
  };
  </code></pre>
  
  <p>But by default having non-const instance of class <code>A</code> will cause non-const version of overloaded function to be called:</p>
  
  <pre><code>int main() 
  {
      A a;
      return (const int)a.mass();
  }
  </code></pre>
  
  <blockquote>
    <p>error: <code>int&amp; A::mass()</code> is protected within this context</p>
  </blockquote>
  
  <p>How can the <code>const</code> version be called explicitly in this case?</p>