[Bug c++/102283] Inconsistent/wrong overload resolution when using an initializer list and a defaulted template parameter

2021-10-12 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102283 --- Comment #7 from Patrick Palka --- (In reply to Fedor Chelnokov from comment #0 in PR102691) > This code is valid: > ``` > struct Foo {}; > struct Bar {}; > > constexpr int Baz(const Foo&) { return 0; } > constexpr int Baz(Bar&&) { return 1;

[Bug c++/102283] Inconsistent/wrong overload resolution when using an initializer list and a defaulted template parameter

2021-10-12 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102283 Patrick Palka changed: What|Removed |Added CC||fchelnokov at gmail dot com --- Comment

[Bug c++/102283] Inconsistent/wrong overload resolution when using an initializer list and a defaulted template parameter

2021-10-01 Thread dangelog at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102283 --- Comment #5 from Giuseppe D'Angelo --- (Sorry for the delay) Thank you for the analysis. I'm now not really sure if GCC is doing something wrong (vs Clang/MSVC). Feel free to close/suspend this task if you strongly believe GCC is right here.

[Bug c++/102283] Inconsistent/wrong overload resolution when using an initializer list and a defaulted template parameter

2021-09-16 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102283 Jason Merrill changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #4

[Bug c++/102283] Inconsistent/wrong overload resolution when using an initializer list and a defaulted template parameter

2021-09-16 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102283 --- Comment #3 from Patrick Palka --- (In reply to Giuseppe D'Angelo from comment #2) > Hi, > > Do you think that in my original testcase the call should be rejected as > ambiguous as well? (It seems "reasonable" to me, but maybe I'm missing so

[Bug c++/102283] Inconsistent/wrong overload resolution when using an initializer list and a defaulted template parameter

2021-09-15 Thread dangelog at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102283 --- Comment #2 from Giuseppe D'Angelo --- Hi, Do you think that in my original testcase the call should be rejected as ambiguous as well? (It seems "reasonable" to me, but maybe I'm missing some niche detail about overload resolution when combi

[Bug c++/102283] Inconsistent/wrong overload resolution when using an initializer list and a defaulted template parameter

2021-09-15 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102283 Patrick Palka changed: What|Removed |Added CC||ppalka at gcc dot gnu.org --- Comment #