This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32762] Lost variable scope with template class that inherits from templated class using args of the first class
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jul 2007 05:19:46 -0000
- Subject: [Bug c++/32762] Lost variable scope with template class that inherits from templated class using args of the first class
- References: <bug-32762-14852@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-07-14 05:19 -------
> The workaround for now is to replace x[i] with this->x[i].
This is not just a workaround but the correct fix. the reason is because x is
not dependent so it has to be looked up at definition time and not instantation
time (and definition time does not take into account depdent inherited
classes). See http://gcc.gnu.org/gcc-3.4/changes.html for more info.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
GCC build triplet| i486-linux-gnu |i486-linux-gnu
GCC host triplet| i486-linux-gnu |i486-linux-gnu
GCC target triplet| i486-linux-gnu |i486-linux-gnu
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32762