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

             Bug #: 12117
           Summary: Doesn't restrict list initializations to
                    standard/ellipsis conversions for copy constructor
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++0x
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


This should be valid and call the first constructor of "B":

struct A { A(int); }; 
struct B { B(A); } b{{0}};

Instead, clang gives an ambiguity: "error: call to constructor of 'struct B' is
ambiguous". Clang does not implement 13.3.3.1p4 of C++11 thereby the copy and
move constructors of B would both be non-viable because they require user
defined conversions here.

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to