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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Invoking Target(Source const&) is a user-defined conversion too. The conversion
sequence requires binding a reference to the Source object and then converting
it to a Target.

In C++17 there is no call to Target(Target const&) or Target(Target&&) because
the temporary returned by Source::operator Target() is materialized directly
into an object of type Target.

Clang agrees with GCC that Source::operator Target() is a better conversion,
but I can't find the wording specifying that.

Reply via email to