title: Overloading with “const” at end of function declaration
body: <p>I have 3 attempts to overload function "begin()"</p>
  
  <pre><code>class Test
  {
  public:
  
      //case 1: compiler error
      int begin();
      const int begin();
  
      //case 2:compiler warning: type qualifiers ignored on function return type
      int begin();
      const int begin() const;
  
      //case 3: ok
      int begin();
      int begin() const;
  };
  </code></pre>
  
  <p>For the two cases that build successfully, how does the compiler choose which overload is called for <code>begin()</code>?</p>