This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Templates Problem comes from gcc
- To: pfrancq at ulb dot ac dot be
- Subject: Re: Templates Problem comes from gcc
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Wed, 23 Feb 2000 19:40:28 +0100
- CC: gcc at gcc dot gnu dot org
- References: <00022315163201.19952@mecapp97.ulb.ac.be>
> 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