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