I have
struct IMyInterface
{
virtual method1() = 0;
virtual method2() = 0;
};
GCC insists that I have
struct IMyInterface
{
virtual method1() = 0;
virtual method2() = 0;
virtual ~IMyInterface(){};
};
I dont see why. A pure interface is all about the interface (duh). The destructor is part of the internal implementation details of a concrete implementer of the interface; it does not form part of the interface. I understand the whole slicing issue (or at least I think I do)
So my question is - is GCC right to insist on it and if so why?