This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with templates used in a class member.
- To: egcs at cygnus dot com
- Subject: Re: Problem with templates used in a class member.
- From: "Ram'on Garc'ia" <ramon at jl1 dot quim dot ucm dot es>
- Date: Fri, 4 Sep 1998 19:40:00 +0200 (CEST)
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