[Bug c++/77449] False ambiguity for variadic function with non-deduced template parameter
egall at gwmail dot gwu.edu
gcc-bugzilla@gcc.gnu.org
Fri Sep 2 13:54:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77449
Eric Gallager <egall at gwmail dot gwu.edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |egall at gwmail dot gwu.edu
--- Comment #1 from Eric Gallager <egall at gwmail dot gwu.edu> ---
The full error message is:
$ /usr/local/bin/g++ -c -Wall -Wextra pr77449.cc
pr77449.cc: In function ‘int main()’:
pr77449.cc:11:17: error: call of overloaded ‘bar(int, const char [1])’ is
ambiguous
bar<void>(7, ""); // ambiguous according to gcc
^
pr77449.cc:4:6: note: candidate: void bar(Check, T ...) [with X = void; Check =
int; T = {const char*}]
auto bar(Check, T...) -> void;
^~~
pr77449.cc:7:6: note: candidate: void bar(int, T ...) [with X = void; T =
{const char*}]
auto bar(int, T...) -> void;
^~~
As a human reader who doesn't know C++ very well I'd consider it to be
ambiguous, too... maybe as a compromise the error could be downgraded to a
warning?
More information about the Gcc-bugs
mailing list