------- 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