[Bug c++/59389] [C++11] bogus error: call of overloaded ‘Foo?=(<brace-enclosed initializer list>)=?UTF-8?Q?’ is ambiguous

richard-gccbugzilla at metafoo dot co.uk gcc-bugzilla@gcc.gnu.org
Sun Jan 26 19:29:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59389

--- Comment #5 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> ---
Under [over.best.ics]p4, I think both the original example in comment#0 and the
example in comment#2 are valid (so GCC is incorrect to reject both and Clang is
incorrect to reject #2).

The user-defined conversion from {"abc", {"aaa"}} to Foo is not considered when
forming the implicit conversion sequence for the first parameter of Foo's copy
or move constructor, so neither of those is viable in either case. But see also
core issue 1758.



More information about the Gcc-bugs mailing list