[LLVMbugs] [Bug 22259] New: Overload resolution not working with initializer_list

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jan 18 15:34:05 PST 2015


            Bug ID: 22259
           Summary: Overload resolution not working with initializer_list
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: duncan.forster at mac.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Test case.

#include <string>
#include <iostream>

void Test(const bool arg) 
    std::cout << "Wrong[" << arg << "]" << std::endl;
void Test(const std::initializer_list<std::string> arg)
    std::cout << "Right[" << arg.size() << "]" << std::endl;

int main (int /*argc*/, char * const /*argv*/[]) 
    return 0;

This should print:

Instead I get:

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150118/ab92942e/attachment.html>

More information about the llvm-bugs mailing list