// This file is part of Desktop App Toolkit, // a set of libraries for developing nice desktop applications. // // For license and copyright information please follow this link: // https://github.com/desktop-app/legal/blob/master/LEGAL // #ifdef _DEBUG #pragma once #include template class PrintDead : public T { public: template PrintDead(Args&&... args) : T(std::forward(args)...) {} ~PrintDead() { std::cout << "\033[32m" // Green. << "Instance of class " << typeid(T).name() << " is dead!" << "\033[0m" << std::endl; } }; // #include "base/debug_destroy_informer.h" // Usage: std::make_shared>(...); // Usage: PrintDead(...); #endif // _DEBUG