title: Doesn't compiler give an ambiguous error for "const" and "not-const" functions
body: <p>I have overloaded <code>const</code> and <code>non-const</code> functions in c++ structure. Then, I have run the program and I wondered, it's working fine without ambiguous error. </p>
  
  <pre><code>#include &lt;iostream&gt;
  
  struct St 
  {
    int f() const 
    { 
        return 1; 
    }
  
    int f()
    { 
        return 2;
    }
  } s;
  
  int main() 
  {
      int ret = s.f();  
      std::cout&lt;&lt;ret&lt;&lt;std::endl;
      return 0;
  }
  </code></pre>
  
  <p>So, I just want to know, Why doesn't the compiler give an ambiguous error  for "const" and "not-const" functions?</p>