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]

Re: g++ 2.95 Sun,HP: problem with forward-declared nested derived class , template


Hi,

> Two instances of the same problem: one on Solaris 2.6, one on HP-UX 10.20;
> both with gcc 2.95.1.
> 
> If the nested class (B) is fully declared (rather than just forward
> declared) inside the "outer" class (A), it compiles correctly.

	One more problem instance: the same problem is found
in g++ 2.95.2 on Solaris 2.7.

>      1	// problem with forward-declared nested derived class template
>      2	
>      3	template <typename T>
>      4	class A
>      5	{
>      6	public:
>      7	  class B;
>      8	};
>      9	
>     10	template <typename T>
>     11	class A<T>::B : public T
>     12	{
>     13	};

	By the way, if class A<T>::B is not derived from T (or something
like list<T> for that matter), things compile okay.

Regards,
  Beta.


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