Does it ever make sense to override a pure virtual method with another pure virtual method? Are there any functional differences or perhaps code style reasons to prefer one of the following options over the other?
class Interface {
public:
virtual int method() = 0;
};
class Abstract : public Interface {
public:
int method() override = 0;
};
class Implementation : public Abstract {
public:
int method() override { return 42; }
};
Versus:
class Interface {
public:
virtual int method() = 0;
};
class Abstract : public Interface {};
class Implementation : public Abstract {
public:
int method() override { return 42; }
};