[Bug c++/11429] nested class within template class is not inherited by derived template class

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Fri Jul 4 20:45:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11429


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


------- Additional Comments From bangerth at dealii dot org  2003-07-04 20:45 -------
This is not a bug, but warns you correctly of invalid code: if
you use identifiers such as "nested" in the derived class, then
they are implicitly typenames of the form 
  typename base<T>::nested
The point is that the standard prescribes that names from template
dependent base classes are not visible during lookup, so your
code is invalid and will not even compile with gcc3.4. You
really need to write
  typename base<T>::nested
instead.

Wolfgang



More information about the Gcc-bugs mailing list