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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think GCC and MSVC are correct here:
[over.match.list]/16.3.1.7
. In copy-listinitialization, if an explicit constructor is chosen, the
initialization is ill-formed. [ Note: This differs from
other situations (16.3.1.3, 16.3.1.4), where only converting constructors are
considered for copy-initialization.
This restriction only applies if this initialization is part of the final
result of overload resolution. — end note ]


Even though the note is techincally not part of the standard, it describes why
clang is wrong here. That is the explicit constructors are used too to figure
out the overload and only if there was no ambiguous, it would be considered as
ill-formed.

Reply via email to