This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15534] Fails to inherit types from base class


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]