36extern std::vector<std::string>
s_Logs;
38#if __cplusplus >= 202002L && defined(__cpp_lib_format)
44#define FUNC_FORMAT_AVAILABLE 1
50#define FUNC_FORMAT_AVAILABLE 0
53#if __cplusplus < 202002L
55 "std::format is not supported by your compiler configuration. Please consider using -std=c++20 or later."
57#define FUNC_FMT(...) std::format(__VA_ARGS__)
72 std::println("ASSERTION FAILED(DEBUG) at line {} in file {}", \
73 __LINE__, __FILE__); \
81 std::println("VERIFICATION FAILED at line {} in file {}", \
82 __LINE__, __FILE__); \
96#define FUNC_AOV_EX(x, str) \
99 std::println("VERIFICATION FAILED: "); \
105#define FUNC_AOV_EX(x, str) \
108 FUNC_FATAL("VERIFICATION FAILED, description:"); \
122#define FUNC_DASS(x) \
125 std::println("STRIPPED ASSERTION FAILED at line {} in file {}", \
126 __LINE__, __FILE__); \
137#define PUSH_LOG(prefix, ...) \
139 s_Logs.emplace_back(std::string(prefix) + FUNC_FMT(__VA_ARGS__)); \
147#define FUNC_DBG(...) \
149 std::println("\033[36m[Debug]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
150 PUSH_LOG("[Debug]: ", __VA_ARGS__); \
160#define FUNC_INF(...) \
162 std::println("\033[34m[Info]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
163 PUSH_LOG("[Info]: ", __VA_ARGS__); \
170#define FUNC_WARN(...) \
172 std::println("\033[33m[Warn]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
173 PUSH_LOG("[Warn]: ", __VA_ARGS__); \
180#define FUNC_GRAY(...) \
182 std::println("\033[90m[Note]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
183 PUSH_LOG("[Note]: ", __VA_ARGS__); \
190#define FUNC_ERR(...) \
192 std::println("\033[1;35m[Error]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
193 PUSH_LOG("[Error]: ", __VA_ARGS__); \
200#define FUNC_FATAL(...) \
202 std::println("\033[1;31m[FATAL]: {}\033[0m", FUNC_FMT(__VA_ARGS__)); \
203 PUSH_LOG("[FATAL]: ", __VA_ARGS__); \
208#ifndef WIN32_LEAN_AND_MEAN
209#define WIN32_LEAN_AND_MEAN
214#define strcasestr StrStrIA
219#define strncasecmp _strnicmp
220#define strcasecmp _stricmp
230 nullptr,
"open", path.string().c_str(),
nullptr,
nullptr, SW_SHOW);
231#elif defined(__APPLE__)
232 std::system((
"open " + path.string() +
" &").c_str());
233#elif defined(__linux__)
234 std::system((
"xdg-open " + path.string() +
" &").c_str());
#define FUNC_ERR(...)
A non-fatal, recoverable from error.
Definition FuncPCH.h:190
std::vector< std::string > s_Logs
Definition MacroUtils.cc:4
void OpenFileExplorer(const std::filesystem::path &path)
Definition FuncPCH.h:227