Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created September 8, 2017 09:37
Embed
What would you like to do?
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