#pragma once #include namespace LX { template inline void ThrowIf(const bool condition, Args... args) { if (condition) [[unlikely]] { throw T(args...); }} template inline void SafeLog(std::ofstream* log, Args... args) { if (log != nullptr) { (*log << ... << args); *log << "\n"; } } constexpr const char* LOG_BREAK = "\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n"; }