[LLVMbugs] [Bug 16048] New: friend declaration with qualified name fails to find class template made visible by using-directive

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 17 04:27:47 PDT 2013


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

            Bug ID: 16048
           Summary: friend declaration with qualified name fails to find
                    class template made visible by using-directive
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zilla at kayari.org
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

namespace N1
{
    struct Ok { };

    template<class T>
    struct NotOk { };
}

namespace N2
{
    using namespace N1;
}

struct B
{
    friend struct N2::Ok;

    template<class T>
    friend struct N2::NotOk;
};


t.cc:19:23: error: friend declaration of 'NotOk' does not match any declaration
in namespace 'N2'
    friend struct N2::NotOk;
                  ~~~~^
1 error generated.

It works for a non-template (as shown) and also if the names are introduced
into N2 with using-declarations.

-- 
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/20130517/d68e79b5/attachment.html>


More information about the llvm-bugs mailing list