mirror of
https://github.com/AxioDL/LibCommon.git
synced 2026-07-11 06:18:45 -07:00
TString: Also explicitly add fmt formatter for TString underlying type
Also allows trivially formatting this as well.
This commit is contained in:
@@ -1346,6 +1346,13 @@ using TStringList = std::list<TString>;
|
||||
using T16StringList = std::list<T16String>;
|
||||
using T32StringList = std::list<T32String>;
|
||||
|
||||
template <>
|
||||
struct fmt::formatter<TBasicString<char, TStringList>> : fmt::formatter<std::string_view>
|
||||
{
|
||||
auto format(const TBasicString<char, TStringList>& str, fmt::format_context& ctx) const {
|
||||
return fmt::formatter<std::string_view>::format(str.ToStdString(), ctx);
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct fmt::formatter<TString> : fmt::formatter<std::string_view>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user