Last active
September 8, 2017 05:55
-
-
Save deque-blog/cd4fe88c3a7eaa2881ee92c09ba2f45c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Interface1 | |
{ | |
virtual std::unique_ptr<Interface1> cloneInterface1() const = 0; | |
//... | |
}; | |
struct Interface2 | |
{ | |
virtual std::unique_ptr<Interface2> cloneInterface2() const = 0; | |
//... | |
}; | |
class Implementation : public Interface1, public Interface2 | |
{ | |
public: | |
virtual std::unique_ptr<Interface1> cloneInterface1() const override { /* ... */ } | |
virtual std::unique_ptr<Interface2> cloneInterface2() const override { /* ... */ } | |
//... | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment