This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/2130: problem at compilation when using friend with a template class
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2130: problem at compilation when using friend with a template class
- From: francois dot sugny at wanadoo dot fr
- Date: 1 Mar 2001 00:21:35 -0000
- Reply-To: francois dot sugny at wanadoo dot fr
>Number: 2130
>Category: c++
>Synopsis: problem at compilation when using friend with a template class
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Feb 28 16:26:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: SkunkLabs
>Release: unknown-1.0
>Organization:
>Environment:
Linux RedHat 7.0 with snapshot 20010228
>Description:
the use of friend has a bug, we cannot use anymore
a predefined type using typedef
typedef CCOMptr<const MyClass> ptr;
friend ptr;
>How-To-Repeat:
just try to compile using
gcc test.cpp
>Fix:
just replace ptr in the friend definition :
typedef CCOMptr<const MyClass> ptr;
friend ptr;
=>
typedef CCOMptr<const MyClass> ptr;
friend CCOMptr<const MyClass>;
>Release-Note:
>Audit-Trail:
>Unformatted: