fmt: add support for std::u8string

This commit is contained in:
Nekotekina 2021-07-10 21:11:52 +03:00 committed by Ivan
parent ea0c559bc3
commit 5dfa908835

View File

@ -152,6 +152,27 @@ void fmt_class_string<std::vector<char>>::format(std::string& out, u64 arg)
out.append(obj.cbegin(), obj.cend()); out.append(obj.cbegin(), obj.cend());
} }
template <>
void fmt_class_string<std::u8string>::format(std::string& out, u64 arg)
{
const std::u8string& obj = get_object(arg);
out.append(obj.cbegin(), obj.cend());
}
template <>
void fmt_class_string<std::u8string_view>::format(std::string& out, u64 arg)
{
const std::u8string_view& obj = get_object(arg);
out.append(obj.cbegin(), obj.cend());
}
template <>
void fmt_class_string<std::vector<char8_t>>::format(std::string& out, u64 arg)
{
const std::vector<char8_t>& obj = get_object(arg);
out.append(obj.cbegin(), obj.cend());
}
template <> template <>
void fmt_class_string<char>::format(std::string& out, u64 arg) void fmt_class_string<char>::format(std::string& out, u64 arg)
{ {