Here some stuff which I did in Visual Studio 2005 and CodeWarrior.
So, it's definitelly not a jsut compiler bug.
I defined class like this:
Code:
class A
{
public:
virtual void B() = 0;
};
So, I have pure virtual method.
Sure thing, we can't instantiate class.
However, what I found I can add implementation for pure virtual method (which doesn't make any sense)
Code:
void A::B()
{
printf("z");
}
And compiler won't say me a damn thing.
I can't instantiate it still.
However, I can do this:
Code:
class C: public A
{
public:
virtual void B();
};
void C::B()
{
A::B();
}
First of all I was able to compile this, where I can pure abstract method.
Second, I was able to debug it and step into A::B.
It's definitelly crazy.
Does anybody have explanation, why it works?