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

           Summary: "using Base::template_mf" doesn't increase access of
                    template_mf if template_mf is called with explicit
                    template parameters
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


$ cat test2.cc
class Base {
protected:
    template<typename T> void Foo(T);
};

struct Derived : Base {
    using Base::Foo;
};

void foo() {
    Derived d;
    d.Foo ARGS(3);
}
$ ./clang++ -fsyntax-only test2.cc -DARGS=
$ ./clang++ -fsyntax-only test2.cc -DARGS="<int>"
test2.cc:12:7: error: 'Foo' is a protected member of 'Base'
    d.Foo ARGS(3);
    ~~^~~~~~~~
test2.cc:3:31: note: declared protected here
    template<typename T> void Foo(T);
                              ^
1 error generated.


The call to d.Foo() checks access through the using declaration when it's
called with deduced template arguments, but not when it's called with explicit
ones.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to