This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/10694: [3.3/3.4 regression] Befriending a function in a classthat is only forward-declared
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 11 May 2003 11:16:00 -0000
- Subject: Re: c++/10694: [3.3/3.4 regression] Befriending a function in a classthat is only forward-declared
- Reply-to: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
The following reply was made to PR c++/10694; it has been noted by GNATS.
From: Steven Bosscher <s.bosscher@student.tudelft.nl>
To: bangerth@dealii.org, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org
Cc:
Subject: Re: c++/10694: [3.3/3.4 regression] Befriending a function in a class
that is only forward-declared
Date: Sun, 11 May 2003 13:10:09 +0200
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10694
: Search converges between 2003-03-10-trunk (#149) and 2003-03-11-trunk
(#150).
Line-numbered input is:
========================================
1 template <class T> struct Y;
2
3 template <class S> class X {
4 template <class T> friend void Y<T>::member();
5 };
6
7 template <class T> struct Y {
8 void member() {
9 X<int>();
10 }
11 };
12
13 template class Y<int>;
14
========================================
Diagnostic output follows, from the last compiler tested:
input: In instantiation of `X<int>':
input:9: instantiated from `void Y<T>::member() [with T = int]'
input:13: instantiated from here
input:4: error: prototype for `template<class T> void Y::member()' does not
match any in class `Y<T>'
input:8: error: candidate is: void Y<T>::member()
Compiler output follows, from the last compiler tested:
.file "input"
.ident "GCC: (GNU) 3.4 20030311 (experimental)"