This is the mail archive of the gcc-bugs@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: ICE using member templates.


> 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


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