[Bug c++/54377] Consider default arguments in "wrong number of template arguments" diagnostic
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Apr 19 16:32:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54377
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-04-19
CC| |manu at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-04-19 16:32:56 UTC ---
Or say:
test.cpp: In function 'int main()':
test.cpp:6:12: error: wrong number of template arguments (1, should be at least
2)
foo<int> f;
^
test.cpp:2:8: note: provided for 'template<class, class, class=void,
class=void> struct foo'
struct foo {};
^
that is, make the second message a note, mention the minimum, fix the location
to point to foo, show the default arguments in the declaration.
I would guess that counting how many are non-default is easier, but someone
will have to provide a patch.
More information about the Gcc-bugs
mailing list