#pragma once namespace console { enum console_type { con_type_error = 1, con_type_debug = 2, con_type_warning = 3, con_type_info = 7 }; void print(int type, const char* fmt, ...); template void error(const char* fmt, Args&&... args) { print(con_type_error, fmt, std::forward(args)...); } template void debug(const char* fmt, Args&&... args) { #ifdef DEBUG print(con_type_debug, fmt, std::forward(args)...); #endif } template void warn(const char* fmt, Args&&... args) { print(con_type_warning, fmt, std::forward(args)...); } template void info(const char* fmt, Args&&... args) { print(con_type_info, fmt, std::forward(args)...); } }