https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102247

TC <rs2740 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rs2740 at gmail dot com

--- Comment #2 from TC <rs2740 at gmail dot com> ---
struct X { explicit X() {} };
struct Y { Y() {} };

void f(X);
void f(Y);

void g() {
    f({}); // GCC rejects, clang accepts
}

GCC is correct. For copy-list-initialization, explicitness of constructor is
not considered in forming implicit conversion sequences; rather, if a explicit
constructor is chosen, the program is ill-formed. See core issue 1228 and 
[over.match.list].

Reply via email to