This is the mail archive of the gcc-prs@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]
Other format: [Raw text]

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:


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