[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    Re: gcc-2.95.1 19990809 - Member template ICE (4 lines).
From:       Paul Burchard <burchard () pobox ! com>
Date:       1999-08-09 20:52:19
[Download RAW message or body]

Here is a non-ICE test case derived from yours which shows a different
problem with member templates.  For this example, gcc (2.95 release plus
Martin's patch) claims that "`B' is not a template", even though it does
not make any such complaint if the enclosing struct A is removed. 
Replacing B<T> by A::B<T> also makes gcc happy.

struct A {
  template <class T> struct B {};
  template <class T> struct C { B<T> b; };
};

Also, here is the shortest version of your test case I could get to ICE:

struct A {
  template <class T> struct B { T x; };
  template <class T> struct C : public B<T> { C() {} };
};

I've submitted a bunch of test cases related to member templates
recently; this appears to be a new one.

-- 
----------------------------------------------------------------------
Paul Burchard   <burchard@pobox.com>   http://www.pobox.com/~burchard/
----------------------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic