Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created September 8, 2017 07:19
Embed
What would you like to do?
struct Interface1
{
virtual owner<Interface1*> clone() const = 0;
//...
};
struct Interface2
{
virtual owner<Interface2*> clone() const = 0;
//...
};
class Implementation : public Interface1, public Interface2
{
public:
virtual owner<Implementation*> clone() const override
{
return new Implementation(*this);
}
//...
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment