In a language with ad-hoc polymorphism like C++, mixins seems entirely unnecessary.
You can just declare by convention that a freestanding clone(T x) -> T function should exist for it to be 'cloneable'.
You can just declare by convention that a freestanding clone(T x) -> T function should exist for it to be 'cloneable'.
It actually does have specific applications. That Wikipedia article shows a good example of polymorphic method chaining. In a former life, I worked with Microsoft’s Active Template Library, which is entirely based on this pattern.