#pragma once #include template class BinaryTree { public: BinaryTree * lChild, * rChild; T data; BinaryTree():lChild(nullptr), rChild(nullptr){} template BinaryTree(T1 &&data):data(std::forward(data)),lChild(nullptr),rChild(nullptr){} ~BinaryTree() { if(lChild) delete lChild; if(rChild) delete rChild; } };