[LLVMbugs] [Bug 22310] New: incorrect function overloading resolution with initializer-list param

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jan 23 10:29:03 PST 2015


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

            Bug ID: 22310
           Summary: incorrect function overloading resolution with
                    initializer-list param
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vv159170 at netbeans.org
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

#include <stdio.h>

struct A {
    A(int x) :    ma(x)    {}
    int        ma;
};

void f(int x)
{
    printf("f(%d)\n", x);
}

void f(A x)
{
    printf("f(A(%d)))\n", x.ma);
}

int main()
{
  f({{1}}); // f(A(1)) should be printed, not f(1)
}

-- 
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/20150123/93655aac/attachment.html>


More information about the llvm-bugs mailing list