diff --git a/include/bits/soi-dbg.hpp b/include/bits/soi-dbg.hpp index 13bece5..fbde5ab 100644 --- a/include/bits/soi-dbg.hpp +++ b/include/bits/soi-dbg.hpp @@ -193,7 +193,7 @@ auto dbg_print(const char (&msg)[N], std::string const &, char const *file, return msg; } -void dbg_print_status(char const *file, int line, char const *function_name) { +void dbg_print_status(char const *file, int line, std::string const& function_name) { std::cerr << ANSI_VALUE << "[" << file << ":" << line << " (" << function_name << ")]" << ANSI_RESET << '\n'; } @@ -222,7 +222,7 @@ template T &&identity(T &&t) { return std::forward(t); } #endif #define SOI_DBG_IMPL_0() \ - soi::detail::dbg_print_status(__FILE__, __LINE__, __func__) + soi::detail::dbg_print_status(__FILE__, __LINE__, soi::detail::extract_method_name(__PRETTY_FUNCTION__)) #define SOI_DBG_IMPL_1(...) \ soi::detail::dbg_print( \ (__VA_ARGS__), \