[LLVMbugs] [Bug 10856] New: Clang is unable to infer template argument for friend function inside namesapce.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Sep 4 07:12:16 PDT 2011


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

           Summary: Clang is unable to infer template argument for friend
                    function inside namesapce.
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++0x
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: expipiplus1 at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=7215)
 --> (http://llvm.org/bugs/attachment.cgi?id=7215)
A testcase program illustrating the problem.

The attached code compiles with gcc 4.6 with -std=c++0x
It fails to compile with clang, with -std=c++0x and -stdlib=libc++

Commenting out lines 1, 2, 24 and 26 (removing the use of the namespace) will
allow clang to compile the code. Qualifying "operator" on line 15 doesn't fix
the error.

Clang is unable to compile the code because it's unable to infer the template
argument R.

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