gcc-2.8.0-971206: Qualified friend declaration in nested class
Thomas Weise
tom@zaphod.wh9.tu-dresden.de
Mon Dec 8 14:24:00 GMT 1997
Cannot specify qualified friend 'foo::f()', just 'f()' works though.
This is for both, gcc-2.8.0-971206 and egcs-1.0.
tom@hermes:/home/tom > g++ -v
Reading specs from
/usr/local/lib/gcc-lib/i486-pc-linux-gnulibc1/2.8.0/specs
gcc version 2.8.0
tom@hermes:/home/tom > g++ x12.cc
x12.cc:7: member `foo::f()' declared as friend before type `foo' defined
tom@hermes:/home/tom > cat x12.cc
class foo
{
public:
static int f();
class bar {
friend int foo::f();
};
};
int main()
{
return 0;
}
--
Thomas Weise, http://www.inf.tu-dresden.de/~tw4
Dresden University of Technology, Department of Computer Science
More information about the Gcc-bugs
mailing list