[Logs] Fix ptr to char array formatting

This commit is contained in:
Ivan Chikish 2023-07-12 05:09:31 +03:00
parent 985ba2d6fb
commit 98d3e30a22
2 changed files with 14 additions and 2 deletions

View file

@ -53,6 +53,18 @@ template <std::size_t N> struct log_class_string<const char[N]> {
}
};
template <std::size_t N> struct log_class_string<char (*)[N]> {
static void format(std::string &out, const void *arg) {
log_class_string<char *, void>::format_n(out, *(char **)arg, N);
}
};
template <std::size_t N> struct log_class_string<const char (*)[N]> {
static void format(std::string &out, const void *arg) {
log_class_string<char *, void>::format_n(out, *(char **)arg, N);
}
};
template <>
struct log_class_string<char8_t *, void> : log_class_string<char *> {};