As already mentioned, you can “fix” this for one derivation level by dividing your current concrete class into an abstract class and a concrete class.
An unusual generalization of this approach is the presence of a class template, which should be used to create a specific class from each abstract class. For example, it can provide a clone method. Or, in Microsoft ATL, it implements an implementation of the IUnknown interface.
However, the abstract class hierarchy with auto-generated concrete leaves as a whole is too much work and complication. A practical approach is to simply document instead what needs to be redefined, for example clone . You cannot force other code to be correct at all, you can only help it in that direction.
By the way, if you could be more specific regarding your specific problem, then there may be much better answers than this general wish.
However, by summarizing your problem, you have summarized the answers.
Cheers and hth.,
Cheers and hth. - alf
source share