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.
reply
You can just declare by convention that a freestanding clone(T x) -> T function should exist for it to be 'cloneable'.