[LLVMbugs] [Bug 18486] New: Ambiguity between template-name and other name should be detected

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 15 06:32:02 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18486

            Bug ID: 18486
           Summary: Ambiguity between template-name and other name should
                    be detected
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kariya_mitsuru at hotmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I think that sample code below should cause error because TEST is ambiguous.

namespace FOO {
    template<int I>
    struct FOO {};
}
using namespace FOO;
void f() { FOO<0> x; }

However, an error does not actually occur.

If above sample is well-formed, why is next code ill-formed?

template<int I>
struct FOO {};
namespace BAR {
    namespace FOO {
        void f() { FOO<0> x; }
    }
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140115/3deedda0/attachment.html>


More information about the llvm-bugs mailing list