Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
It's a bug.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351612
Previous Topic:Can't find an option to set post-build step in Juno
Next Topic:Executable terminates on launch
Goto Forum:
  


Current Time: Tue Jul 08 22:31:55 EDT 2025

Powered by FUDForum. Page generated in 0.25336 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top