title: Passing const object by reference issue
body: <p>Suppose we have the following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  class Person{
  public:
      Person(int age);
      int get_a();
  private:
      int a;
  };
  
  Person::Person(int age)
  {
      a = age;
  }
  
  int Person::get_a()
  {
      return a;
  }
  
  void Show_Age(Person P)
  {
      std::cout&lt;&lt;P.get_a()&lt;&lt;std::endl;
  }
  
  int main() {
  
      Person P(10);
      Show_Age(P);
      return 0;
  }
  </code></pre>
  
  <p>Now suppose we have a heavy object, we should pass Person by reference, so we proceed:</p>
  
  <pre><code>void Show_Age(Person &amp;P)
  {
      std::cout&lt;&lt;P.get_a()&lt;&lt;std::endl;
  }
  </code></pre>
  
  <p>There isn't a problem, but a good observation is P should be const, we try with it:</p>
  
  <pre><code>void Show_Age(const Person &amp;P)
  {
      std::cout&lt;&lt;P.get_a()&lt;&lt;std::endl;
  }
  </code></pre>
  
  <p>A compiler failure:</p>
  
  <pre><code>error: passing ‘const Person’ as ‘this’ argument of ‘int Person::get_a()’ discards qualifiers [-fpermissive]
  </code></pre>
  
  <p>How to solve it?</p>