[LLVMbugs] [Bug 17696] New: bogus error when accessing union member through pointer to member template argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Oct 25 10:55:22 PDT 2013


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

            Bug ID: 17696
           Summary: bogus error when accessing union member through
                    pointer to member template argument
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: fraclead at fakeinbox.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The compiler complains with "error: right hand operand to ->* has non
pointer-to-member type 'int'" for the following code.

struct a
{
    union {int i;};
};

template <int (a::*p)>
struct b : a
{
    b () {this->*p = 0;}
};

b<&a::i> c;

-- 
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/20131025/79560bd6/attachment.html>


More information about the llvm-bugs mailing list