------- Additional Comments From gdr at integrable-solutions dot net 2005-03-26 19:52 ------- Subject: Re: Do not print default template arguments in error messages
"giovannibajo at libero dot it" <[EMAIL PROTECTED]> writes: | ------- Additional Comments From giovannibajo at libero dot it 2005-03-26 19:24 ------- | OK, before I clean up the patch, I'll post an example. For this code: | | ---------------------------------------------- | #include <map> | #include <vector> | #include <string> | | std::map<std::string, std::vector<int> > m; | | void bar(void) | { | std::vector<int> k; | m.insert(std::make_pair(0, k)); | } | ---------------------------------------------- | | I get this: | | <path>/stl_pair.h: In constructor 'std::pair<_T1, _T2>::pair(const | std::pair<_U1, _U2>&) [with _U1 = int, _U2 = std::vector<int>, _T1 = const | std::string, _T2 = std::vector<int>]': | test3.cc:10: instantiated from here | <path>/stl_pair.h:90: error: invalid conversion from 'const int' to 'const | char*' | <path>/stl_pair.h:90: error: initializing argument 1 | of 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, | const _Alloc&) [with _CharT = char]' | | (I manually edited '<path>') | Without my patch, I get this: That is fair improvement. I realize we don't retain std::string in the last diagnostic, but we don't need to do that before you check-in your patch -- that is a whole project in itself. -- Gaby -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14912