Bug 127024 - make member for pure virtual functions
Summary: make member for pure virtual functions
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-09 17:29 UTC by Becheru Petru-Ioan
Modified: 2008-05-27 15:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Becheru Petru-Ioan 2006-05-09 17:29:16 UTC
Version:           unknown (using KDE 3.5.2, Debian Package 4:3.5.2-2+b1 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.16-1-k7

Make member should not work if the method is virtual pure ( declaration virtual f()=0; )
Comment 1 Maciej Pilichowski 2008-05-27 09:40:15 UTC
I assume you are talking about C++, but then it is INVALID.
Comment 2 Andreas Pakulat 2008-05-27 10:43:01 UTC
I think the report is correct, it doesn't make sense to create an implementation for a pure virtual.
Comment 3 Maciej Pilichowski 2008-05-27 11:30:39 UTC
"Pure" virtual method can have body. Short explanation -- to ensure there is no instance of such class and on the other hand to ensure that this method can be safely called without crashing an app (useful with several levels of inheritance). It is most commonly used for destructors to ensuring the object will clean after itself.

It is C++ feature and Kdevelop should not "correct" C++. Thus INVALID.
Comment 4 Andreas Pakulat 2008-05-27 15:15:21 UTC
Hmm, digging through the C++ standard you're right.