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]

c++/2130: problem at compilation when using friend with a template class



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


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