Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT reports bug on valid cpp multiple inheritance
CDT reports bug on valid cpp multiple inheritance [message #915553] Mon, 17 September 2012 10:19 Go to next message
J S is currently offline J S
Messages: 1
Registered: September 2012
Junior Member
Eclipse/CDT is reporting a bug on "new Listener()", though this compiles and executes with g++. Is this a CDT bug?

Note the classes have more data than listed here as this is trimmed down, and names have been changed to protect the innocent.

class BaseIntf {
public:
    virtual ~BaseIntf() {}
    virtual void foo() = 0;
};

class BaseImpl: public virtual BaseIntf {
public:
    virtual void foo() {}
};

class ListenerBaseInft: public virtual BaseIntf {
};

class Listener: public ListenerBaseInft, public BaseImpl {
};

int main(int argc, char *argv[]) {
    // The type 'Listener' must implement the inherited pure virtual method 'BaseIntf::foo'
    Listener* listener = new Listener();
    listener->foo();
    return 0;
}

Re: CDT reports bug on valid cpp multiple inheritance [message #916230 is a reply to message #915553] Tue, 18 September 2012 15:05 Go to previous messageGo to next message
Klaus Mr is currently offline Klaus Mr
Messages: 106
Registered: November 2011
Senior Member
check:
http://www.eclipse.org/forums/index.php/t/274600/

regards,
klaus
Re: CDT reports bug on valid cpp multiple inheritance [message #916748 is a reply to message #915553] Wed, 19 September 2012 08:04 Go to previous message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
It's a bug.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351612


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Can't find an option to set post-build step in Juno
Next Topic:Executable terminates on launch
Goto Forum:
  


Current Time: Thu Jul 24 06:46:01 EDT 2014

Powered by FUDForum. Page generated in 0.01765 seconds