[Bug c++/83445] conversion function has too high priority in overload resolution

2020-08-18 Thread karzh at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83445 --- Comment #5 from Alexander Karzhenkov --- Also note that const-qualifier on `Source::operator Target()` affects the conversion sequence (see https://godbolt.org/z/MexGW9). This seems inconsistent here.

[Bug c++/83445] conversion function has too high priority in overload resolution

2020-08-18 Thread karzh at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83445 --- Comment #4 from Alexander Karzhenkov --- r269667 concerns initializing an object from prvalue. Here we have `Target` being initialized from lvalue if type `Source`. What we can consider as being initialized from prvalue is the argument of co

[Bug c++/83445] conversion function has too high priority in overload resolution

2020-08-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83445 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug c++/83445] conversion function has too high priority in overload resolution

2020-08-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83445 --- Comment #2 from Jonathan Wakely --- 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 T

[Bug c++/83445] conversion function has too high priority in overload resolution

2020-08-17 Thread karzh at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83445 Alexander Karzhenkov changed: What|Removed |Added CC||karzh at mail dot ru --- Comment