25 #define _FILE (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__) 28 #define DEBUG(args...) { std::cout << gk::Debug::textColor(gk::Debug::TextColor::Red, true) << _FILE << ":" << __LINE__ << ":" << gk::Debug::textColor(); gk::Debug::print(args); } 29 #define TRACE(s) { DEBUG("Function called: " #s); s } 31 #define DEBUG(args...) {} 32 #define TRACE(s) { s } 46 return std::string(
"\33[0;") + ((color < 10) ?
"0" :
"") + std::to_string(color) +
";0" + ((bold) ?
"1" :
"0") +
"m";
48 return std::string(
"");
52 template<
typename... Args>
54 std::ostringstream stream;
55 std::vector<int> tmp{0, ((void)(stream << args <<
" "), 0)...};
60 template<
typename... Args>
62 std::cerr << makeString(std::forward<Args>(args)...) << std::endl;
68 #endif // GK_DEBUG_HPP_
std::string makeString(Args &&...args)
std::string textColor(u8 color=TextColor::White, bool bold=false)
void print(Args &&...args)