This is the mail archive of the gcc@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]

Declaration of static friend function


Hello
I am working with gcc version 2.91 and I am facing the following problem,
I wonder if any of you can help me.
It seems that it is not possible to declare in a class a static friend
function from another class
what I try to compile is this :
class A_maker {
	.
	.
	.
  public:
	A_maker (MachineType mtype ) {(make(mtype));}
	static A * make (MachineType mtype = 1);
	.
	.
	.
};
class A{
	.
	.
	.
protected:
	A(void) {};
     friend static A* A_maker::make(MachineType mtype); <-- this line fails
	.
	.
	.
};
and the error I got:
"storage class specifiers invalid in friend function declarations"
Is it true that this version  doesn't support static friends ? 
does anyone knows if this feature is supported in the current version
(2.95.2) ?
Thank you
Assaf Mevorach



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