This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14912] Do not print default template arguments in error messages
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Mar 2005 22:09:26 -0000
- Subject: [Bug c++/14912] Do not print default template arguments in error messages
- References: <20040410193158.14912.schnetter@aei.mpg.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2005-03-25 22:09 -------
Subject: Re: Do not print default template arguments in error messages
"giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> writes:
| The first non-trivial issue is that, in order to print "std::vector<int>"
| instead of "std::vector<int, std::allocator<int> >", we need to do the template
| substitution at error printing time, and check if the resulting substitution
| match.
I don't think so. Look at the way error.c print templates.
Either that, or I need to mark template arguments with a flag if they
| come from the template-id.
|
| Also, should we skip default arguments also in lines like this:
|
| test.cc: In member function `void A<T, N, X>::foo() [with T = int, int N = 0,
| int X = 1]':
|
| We would be left with something like :
Look at the most general template and same_type_p() with any default
type. Again that is better done with cxx-pretty-print.c
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14912