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: gcc 2.95.2 ICE with templates


> I do not understand the error message, do you by any chanse know
> what is wrong with my code example?

The 'class' you declare as a friend is not a class, but a
typedef-name. You must not use a typedef-name in an elaborated type
specifier, not even in a friend declaration. If you write

  friend class NoCleanupMgr2;

even g++ 2.95 compiles it fine.

Regards,
Martin

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