https://bugs.llvm.org/show_bug.cgi?id=45216

Richard Smith <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #1 from Richard Smith <[email protected]> ---
This is a GCC bug. The lookup for the name on the left of :: "considers only
namespaces, types, and templates whose specializations are types" according to
the C++ standard, so following the normal unqualified lookup rules it should
find both the namespace ::N1 and the struct N2::N1.


Modified example showing why lookup to the left of :: should consider types:

namespace N1 {
   const char* f();
}

namespace N2 {
  struct X {
    static const char* f();
  };
  using N1 = X;
}

using namespace N2;

using N1::f; // Clang: ambiguous, GCC: N1::f (OK)
struct Q : N2::N1 {
  using N1::f; // Clang: ambiguous, GCC: N1::f (error)
};

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to