[LLVMbugs] [Bug 10196] New: Clang C++98 too eagerly consumes "&&" logical-AND as a rvalue reference

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jun 25 15:35:48 PDT 2011


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

           Summary: Clang C++98 too eagerly consumes "&&" logical-AND as a
                    rvalue reference
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: schaub.johannes at googlemail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


This is valid C++03:

struct A {
  operator int();
} a;

void operator+(int(A::*)(), A);

void f() { &A::operator int&& +a; }

Clang complains

main1.cpp:7:28: warning: rvalue references are a C++0x extension
[-Wc++0x-extensions]
void f() { &A::operator int&& +a; }
                           ^
main1.cpp:7:16: error: no member named 'operator int &&' in 'A'
void f() { &A::operator int&& +a; }

-- 
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.



More information about the llvm-bugs mailing list