[LLVMbugs] [Bug 12564] New: Reference type matching in noexcept decls broke

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 16 03:47:12 PDT 2012


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

             Bug #: 12564
           Summary: Reference type matching in noexcept decls broke
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: llvm-bugs at quasiparticle.net
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


This fails to compile in r154806 with "error: non-const lvalue reference to
type 'Base' cannot bind to a value of unrelated type 'Derived'". Calling
d.bar(d) in Derived::foo works fine.

struct Base {
    void bar(Base&) {}
};

struct Derived : Base {
    void foo(Derived& d) noexcept(noexcept(d.bar(d))) {}
};


libstdc++ uses this a lot internally, too.

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