[Bug c++/40793] "Error: no matching function for call to XYZ" doesn't display function-template-arguments
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 1 00:14:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40793
--- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2010-12-01 00:13:52 UTC ---
(In reply to comment #9)
> So with the example in comment #5, we get:
> t.cc: In function ‘void f()’:
> t.cc:5:31: error: no matching function for call to ‘staticPrint()’
> t.cc:2:18: note: candidate is: template<class T, T t> void staticPrint()
>
> --- CUT ---
> Is that good enough?
I don't think so. The problem is that looking at the error, one cannot say what
are the template arguments (which may be the result of something else). The
desired output is mentioned in comment #5.
Printing the candidates is of course an improvement.
More information about the Gcc-bugs
mailing list