This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15534] Fails to inherit types from base 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: 19 May 2004 03:12:09 -0000
- Subject: [Bug c++/15534] Fails to inherit types from base class
- References: <20040519030420.15534.igodard@pacbell.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-19 03:12 -------
This is equivent to:
template <class T> class A
{
typedef int t;
};
template <class T> class B: A<T>
{
typedef t t1;
};
Which is invalid as t is not dependent so it needs to be declare not in the subclasses.
The fix would be to declare t1 as "typedef A<T>::t t1;"
Also one the mainline I get the following note:
pr15534.ii:31253: error: `size_type' does not name a type
pr15534.ii:31253: note: (perhaps `typename std::allocator<_CharT>::size_type' was intended)
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15534