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: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Mar 2005 19:26:43 -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 giovannibajo at libero dot it 2005-03-26 19:26 -------
Another comparison:
---------------------------------------
#include <vector>
template <class T, int N=0, int X=1>
struct A
{
std::vector<T> v;
void foo(void)
{ v.doesnotexist(); }
};
void foo(void)
{
A<int,0> a;
a.foo();
}
---------------------------------------
Patched:
test.cc: In member function 'void A<T, N, X>::foo() [with T = int]':
test.cc:14: instantiated from here
test.cc:9: error: 'class std::vector<int>' has no member named 'doesnotexist'
Unpatched:
test.cc: In member function `void A<T, N, X>::foo() [with T = int, int N = 0,
int X = 1]':
test.cc:14: instantiated from here
test.cc:9: error: 'class std::vector<int, std::allocator<int> >' has no member
named 'doesnotexist'
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14912