#pragma once #if _DEBUG constexpr bool DebugBuild = true; #else constexpr bool DebugBuild = false; #endif #include inline void assertion(const bool& expr,const char* msg) noexcept { if constexpr (DebugBuild) { if (!expr) throw std::runtime_error(msg); } }; template inline void logD(const T&... x) { if constexpr (DebugBuild) { (std::cout << ... << x) << std::endl; } }; template inline void logE(const T&... x) { if constexpr (DebugBuild) { (std::cerr << ... << x) << std::endl; } };