Templates Problem comes from gcc
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Wed Feb 23 10:53:00 GMT 2000
> The bug that I reported in the last mail has the following origin:
Thanks for your bug report. I believe this is not a bug in gcc, but in
your code. In C++, the members of a base class which is a template are
not found during nondependent name look (nb is not a dependent name),
so nb is bound to the global variable.
If you want to refer to the variable from the base class, you must
write that as foo1<T>::nb.
Hope this helps,
Martin
More information about the Gcc
mailing list