// // Created by David Hackbarth on 27.02.26. // #ifndef MISC_TEMPLATES_H #define MISC_TEMPLATES_H template void safeDelete(T*& pObj) { if (pObj != nullptr) { delete pObj; pObj = nullptr; } } template class Node { public: T data; Node* next; Node(T value) : data(value), next(nullptr) {} }; #endif //MISC_TEMPLATES_H