public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15897] New: cannot declare template friend decls of member functions
@ 2004-06-09 15:53 thomas dot rudlof at gmx dot de
2004-06-09 15:58 ` [Bug c++/15897] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: thomas dot rudlof at gmx dot de @ 2004-06-09 15:53 UTC (permalink / raw)
To: gcc-bugs
According to ISO/IEC 14882:1998(E) 14.5.3 clause 6, this code should compile:
template<class T> struct A
{
void foo();
};
class B
{
template<class T> void A<T>::foo();
};
But trying so results in:
trudolf-l4:~/c> g++ friend.cc
friend.cc:10: cannot declare member function `A<T>::foo' within `B'
trudolf-l4:~/c> g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
--
Summary: cannot declare template friend decls of member functions
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: thomas dot rudlof at gmx dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15897
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/15897] cannot declare template friend decls of member functions
2004-06-09 15:53 [Bug c++/15897] New: cannot declare template friend decls of member functions thomas dot rudlof at gmx dot de
@ 2004-06-09 15:58 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-09 15:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-09 15:58 -------
You have a typo in which you missed the friend keyword with that fixed this comes so this is not a bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15897
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-09 15:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-09 15:53 [Bug c++/15897] New: cannot declare template friend decls of member functions thomas dot rudlof at gmx dot de
2004-06-09 15:58 ` [Bug c++/15897] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).