Created
September 8, 2017 09:37
-
-
Save deque-blog/772faf7f5d927efd2c6f98a51ce2907f 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
class Interface | |
{ | |
public: | |
//... | |
std::unique_ptr<Interface> clone() | |
{ | |
return std::unique_ptr<Interface>(cloneImpl()); | |
} | |
protected: | |
virtual Interface* cloneImpl() const = 0; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment