title: Overload resolution fails when a function named the same in a namespace is called from a class method
body: <p>In the code below, it looks quite obvious that the function definition for <code>myFn</code> with two arguments should come from namespace <code>N</code>. But the compiler fails to compile it. Is it a compiler (g++ 8.3) limitation, or imposed by the C++ standard?</p>
  
  <pre class="lang-cpp prettyprint-override"><code>    #include &lt;bits/stdc++.h&gt;
  
      using namespace std;
  
      namespace N
      {
        // Same name function exists in class A
        void myFn(int a, int b)
        {
          cout &lt;&lt; a &lt;&lt; ' ' &lt;&lt; b &lt;&lt; endl;
        }
      }
  
      using namespace N;
      class A {
        public:
          void myFn(int a)
          {
      #ifdef FINE
            // Explicitly specify where should myFn definition come from
            N::myFn(a, a);
      #else
            myFn(a, a);
      #endif
          }
      };
  
      int main()
      {
        A a;
        a.myFn(3);
        return 2;
      }
  </code></pre>