[llvm-bugs] [Bug 37424] New: Invalid private check for member addresses

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 11 13:00:14 PDT 2018


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

            Bug ID: 37424
           Summary: Invalid private check for member addresses
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: anton at korobeynikov.info
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

Consider the following code:

class TestClass {
private:
    void func();
    void func2();
    void func2(int);
};
template <void (TestClass::*)()> class TemplateClass { };
template class TemplateClass<&TestClass::func>;
template class TemplateClass<&TestClass::func2>;

clang rejects the second instantiation while gcc does not. If I'm reading the
standard correctly we should accept both.

-- 
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/20180511/d8fb9b05/attachment.html>


More information about the llvm-bugs mailing list