This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ICE using member templates.
- To: yarnall at lvc dot edu
- Subject: Re: ICE using member templates.
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sat, 1 Apr 2000 20:19:08 +0200
- CC: gcc-bugs at gcc dot gnu dot org
- References: <38E60B80.B11831EF@lvc.edu>
> Language question: So far as I can tell from the standard, when
> referring to a template member of the current template, you do not
> need the "template" qualifier.
Thanks for your bug report. Please note that this is not a forum for
asking language questions; use comp.std.c++ or comp.lang.c++.moderated
for such questions.
> In particular, the initialization of "it" in the c'tor; this (should
> be/is) legal, right?
I'd say it's legal, yes. Another matter is whether you have to use
&klass::member to form a function pointer; you don't if the member is
a static function, and thus when you are not forming a
pointer-to-member. Still, this is a problem for g++. If you write
template<class B>
X(B b) : it(&X::func<B>) {}
g++ will accept your code [as you found yourself].
> I reported this bug about 6 months ago (I'm not intending to nag,
> but I've noticed that Martin is generally remarkably quick at
> responding to bug reports, and no one ever responded to this one, so
> I fear it may have slipped through the cracks).
I just checked; I have it in my "internal errors" folder. I typically
only respond quickly if I see it is not a bug. Only recently I started
putting proper PRs into GNATS, in which case I also confirm reception
of the report. I'm in the process of filling my backlog into GNATS as
well, but that may need a couple more months. To avoid duplicates, I
won't put this one into gnats.
Regards,
Martin