[LLVMbugs] [Bug 12117] New: Doesn't restrict list initializations to standard/ellipsis conversions for copy constructor
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Feb 28 13:48:56 PST 2012
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: unassignedclangbugs at nondot.org
ReportedBy: schaub.johannes at googlemail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list