[Bug c++/102247] Overload resolution with brace-init is ambiguous when it shouldn't be

2022-12-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102247

--- Comment #6 from Andrew Pinski  ---


*** This bug has been marked as a duplicate of bug 60027 ***

[Bug c++/102247] Overload resolution with brace-init is ambiguous when it shouldn't be

2021-12-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102247

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|UNCONFIRMED |RESOLVED

--- Comment #5 from Andrew Pinski  ---
Dup of bug 97220 at least.

*** This bug has been marked as a duplicate of bug 97220 ***

[Bug c++/102247] Overload resolution with brace-init is ambiguous when it shouldn't be

2021-09-09 Thread rs2740 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102247

--- Comment #4 from TC  ---
See also PR 60027 and its duplicates.

[Bug c++/102247] Overload resolution with brace-init is ambiguous when it shouldn't be

2021-09-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102247

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=70637

--- Comment #3 from Andrew Pinski  ---
This looks almost exactly the same as PR 70637.

[Bug c++/102247] Overload resolution with brace-init is ambiguous when it shouldn't be

2021-09-09 Thread rs2740 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102247

TC  changed:

   What|Removed |Added

 CC||rs2740 at gmail dot com

--- Comment #2 from TC  ---
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].

[Bug c++/102247] Overload resolution with brace-init is ambiguous when it shouldn't be

2021-09-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102247

--- Comment #1 from Andrew Pinski  ---
I think this the same case as in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849#c5 .