I have some class, like
class object {
public:
virtual std::string name() const;
};
It provides some interface, and I want all derivated to override method name
.
Problem is, it is not overriden, nothing breaks at compile time, but I get problems in run-time.
Is it any way to enforce method overriding?
EDIT: I want to enforce overriding in all derivates, not just direct descedants!