[Bug c++/117410] Ambiguous overload with variadic arguments

2024-11-03 Thread ddvamp007 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117410 --- Comment #5 from Artyom Kolpakov --- Here is a slightly different example: template void foo(int = 0) {} template void foo(...) requires true {} int main() { foo(); } The current standard contains ambiguity regarding ellipsis. I sug

[Bug c++/117410] Ambiguous overload with variadic arguments

2024-11-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117410 --- Comment #4 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #2) > I think the reason GCC rejects the original one is because it's the only > compiler that correctly implements P2113. Clang apparently supports P2113 since v

[Bug c++/117410] Ambiguous overload with variadic arguments

2024-11-01 Thread ddvamp007 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117410 --- Comment #3 from Artyom Kolpakov --- (In reply to Jonathan Wakely from comment #2) > But without the variadic arguments, the functions have equivalent function > parameter lists, so the constraints are checked. With the ellipsis, they do > no

[Bug c++/117410] Ambiguous overload with variadic arguments

2024-11-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117410 --- Comment #2 from Jonathan Wakely --- But without the variadic arguments, the functions have equivalent function parameter lists, so the constraints are checked. With the ellipsis, they do not have equivalent function parameter lists, so the c