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]

Re: Problem with templates used in a class member.


On Fri, 4 Sep 1998, Alexandre Oliva wrote:
> `fn' is not a valid expression; you must write `&user::fn' to get a
> pointer to member.

I have read your references, and I agree with you (I do not have a copy of
the latest C++ standard, I have checked the public working paper of
December 1996. Anyway, as you acknowledge, using &user::fn should suceed,
but unfortunately it does not. And the fix is not easy, since GCC does not
know about the fn member until the class declaration is closed.

Interestingly, however, the following code does compile with GCC:

class A {
	const static int k = 50;
	char s[k];
};

because EGCS does not treat k as a normal class member.


Ramon




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