[LLVMbugs] [Bug 13069] New: Binary operators cannot be used with std::initializer_list

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jun 9 20:59:29 PDT 2012


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

             Bug #: 13069
           Summary: Binary operators cannot be used with
                    std::initializer_list
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: mimomorin at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu,
                    richard-llvm at metafoo.co.uk
    Classification: Unclassified


Suppose we have the following binary operator.

    template <typename T>
    void operator|(std::initializer_list<T>, int) {/*...*/}

Then, we can call 

    operator|({1, 2, 3}, 0); // OK

but the following

    {1, 2, 3} | 0 // error

results in compiler errors. (I'm using r157875.)

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