Skip to content

Commit

Permalink
feat: add formatter for BSFixedString
Browse files Browse the repository at this point in the history
  • Loading branch information
qudix committed May 20, 2024
1 parent 24a35ce commit 3c1ae20
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CommonLibF4/include/RE/Bethesda/BSFixedString.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,3 +323,13 @@ namespace RE
};
static_assert(std::is_empty_v<BGSLocalizedStrings>);
}

template <class CharT, bool CS>
struct std::formatter<RE::detail::BSFixedString<CharT, CS>, CharT> : formatter<std::string, CharT>
{
template <class FormatContext>
constexpr auto format(const RE::detail::BSFixedString<CharT, CS>& a_version, FormatContext& a_ctx) const
{
return formatter<std::string, CharT>::format(a_version.c_str(), a_ctx);
}
};

0 comments on commit 3c1ae20

Please sign in to comment.