This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/7641: friend declaration of nested types doesn't compile
- From: Detlef Vollmann <dv at vollmann dot ch>
- To: gcc-gnats at gcc dot gnu dot org
- Date: Tue, 20 Aug 2002 02:27:19 +0200
- Subject: c++/7641: friend declaration of nested types doesn't compile
>Number: 7641
>Category: c++
>Synopsis: friend declaration of nested types doesn't compile
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Mon Aug 19 17:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Detlef Vollmann
>Release: 3.3 20020816 (experimental)
>Organization:
vollmann engineering gmbh
>Environment:
System: Linux octo 2.4.18-xfs-1.1 #1 Mon Jul 1 05:12:32 MEST 2002 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /dwarf/pdsrc/gcc/cvs/gcc/configure --program-suffix=-3 --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-version-specific-runtime-libs --enable-languages=c,c++
>Description:
The example code from the standard 14.5.3p6 doesn't compile.
>How-To-Repeat:
g++ -c friend.cpp
>Fix:
friend.cpp:
// template friend problem
template<class T> struct A
{
struct B { };
void f();
};
class C {
template<class T> friend struct A<T>::B;
template<class T> friend void A<T>::f();
};
>Release-Note:
>Audit-Trail:
>Unformatted: