[LLVMbugs] [Bug 6749] New: clang allows references to fulfill reference non-type parameters

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 30 23:56:08 PDT 2010


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

           Summary: clang allows references to fulfill reference non-type
                    parameters
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rideau3 at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


clang accepts the following code:

template <int& i>
struct foo {};

int x, &y = x;

foo<y> f;

It should not, because a reference satisfies no condition in 14.3.2. It comes
close to satisfying the third condition, but references are not objects.

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