--- Comment #11 from herwig at gdsys dot de 2008-04-02 07:17 ---
(In reply to comment #10)
Yes. Since the class declaration must be visible from the place where you
call this function, and since then also the function's definition
(=implementation) is visible, the template should
--- Comment #13 from herwig at gdsys dot de 2008-04-02 16:07 ---
(In reply to comment #12)
The point I meant to make but failed is: a pure virtual method can *only*
*ever* be called explicitly. It can't be called through the vtable because
there can be no objects of the type
--- Comment #7 from herwig at gdsys dot de 2008-04-01 07:58 ---
(In reply to comment #5)
(In reply to comment #0)
The following stripped down code shows pure virtual method definitions for
both
a normal base class and a templated base class. To my surprise, the
templated
--- Comment #9 from herwig at gdsys dot de 2008-04-01 14:38 ---
(In reply to comment #8)
Subject: Re: Pure virtual method body omitted from template
thanks for the clarification. I should have realized it myself, though. I
solved the problem in another way, but out of pure
--- Comment #1 from herwig at gdsys dot de 2008-03-31 06:41 ---
Hi yuri,
I think, this is perfectly correct code and GCC is right in accepting it. First
of all, see Effective C++ issue 14 about the pure virtual destructor. Then
see here:
http://en.wikipedia.org/wiki/Virtual_function
--- Comment #2 from herwig at gdsys dot de 2007-11-20 07:54 ---
(In reply to comment #1)
2.95.3 ICEd on this. I don't know if I can consider this a regression.
Confirmed.
Shouldn't the keyword say wrong-code rather than accepts-invalid? Defining
a pure virtual method is valid
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: herwig at gdsys dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33878