Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
struct Interface1 : Clonable<Interface1> { /* ... */ };
struct Interface2 : Clonable<Interface2> { /* ... */ };
class Implementation : public Interface1, public Interface2
{
//...
protected:
virtual Implementation* cloneImpl() const override
{
return new Implementation(*this);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment