Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct ITool{};
- template<typename T>
- struct ToolContainer : public ITool
- {
- ITool *tool;
- };
- class Tool
- {
- ITool *owner_class;
- public:
- template<typename T>
- Tool(ToolContainer<T> *_owner_class) : owner_class(_owner_class){}
- }
- class ToolLine : public Tool
- {
- public:
- ToolLine() : Tool<ToolLine>(this) {}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement