C++: data member qualified by template parameter

Artem Hodyush artem@duma.gov.ru
Mon May 31 21:06:00 GMT 1999


Don't know if this was already reported for egcs-2.93.21:

struct B { int m; };

template< class T >
void
q( T& t ) {
  t.T::m=1;
}

void f() {
  B b;
  b.B::m=1;   // #1
  q( b );         // #2
}

#2 is semantically identical to #1, but produces funny error message: 
`struct B' has no member named `B::m'




More information about the Gcc-bugs mailing list